diff --git a/devChangelog.md b/devChangelog.md index 4e1fbb0b..6cba0fb5 100644 --- a/devChangelog.md +++ b/devChangelog.md @@ -1,2 +1,2 @@ -### Based on commit 66d6ae5, made 19/09 15:54 UTC +### Based on commit af2bcf9, made 27/09 00:21 UTC ## Commits this release diff --git a/goosemod.bg.js b/goosemod.bg.js index 685ed7c9..f34f0c1f 100644 --- a/goosemod.bg.js +++ b/goosemod.bg.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Теми",confirmText:"Разгледай теми",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Разкрасявайте раздора си с теми"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Изписване от над 100 теми за ощипване и повишаване на вашия потребителски интерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плугини",confirmText:"Рагледайте плугини",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Усилване на вашия Discord под капака"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Приставките повишават опита ви с подобрения в самото приложение"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"магазин",confirmText:"Преглед на магазина в Начало",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Преглеждане на теми и плъгини в магазина"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod използва това е собствен Store, където лесно можете да се огледате и инсталирате"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Настройки",confirmText:"Преглед на настройките на GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Настройки-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Експериментални функции",description:"Пробвай нови експериментални функции"},{name:"Полезност",description:"Направете резервни копия, нулирайте GooseMod и още"},{name:"Ощипвам",description:"Ощипвам GooseMod към това как го искате"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Използвайте Настройките на GooseMod, за да персонализирате функциите, които са"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Има различни опции, които можете да променяте"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Общност",confirmText:"присъединете GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Попитай",description:"Задавайте всякакви въпроси и получете поддръжка"},{name:"Новини",description:"Получавай най-новите новини и съобщения за GooseМod и свързани проекти"},{name:"Включете се",description:"Помощ за предложения, подкрепа на други хора и други"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Присъединете се към Общността на GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Присъединете се към нашия Discord за допълнителна информация и още"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Научете повече",cancelText:"Не съм заинтересован",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"магазин",description:"Научете повече за магазина на GooseMod и какво има в него"},{name:"Настройки",description:"Научете повече за настройките на GooseMod и плугините"},{name:"Общност",description:"Присъединете се към нашия Discord, за да задавате въпроси, да давате обратна връзка, да следите новините и др"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Научете за GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Преминете през кратка обиколка през основните функции на GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плугини"===e[1])),themes:e.settings.items.find((e=>"Теми"===e[1])),snippets:e.settings.items.find((e=>"Откъси"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Теми"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Теми","themes"),id:"gm-home-themes",text:"Теми",selected:!1})),c(t.createElement(a,{style:{display:S||"Плугини"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плугини","plugins"),id:"gm-home-plugins",text:"Плугини",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Откъси"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Откъси","snippets"),id:"gm-home-snippets",text:"Откъси",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Откъси"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Премахване":"добавете",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="добавете",s.buttonText="добавете",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Премахване",s.buttonText="Премахване",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Настройки":o="settings";break;case"Плугини":o="plugins";break;case"Теми":o="themes";break;case"Откъси":o="snippets";break;case"Дневник на Промените":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Настройки"),t?void 0:o("Плугини"),t?void 0:o("Теми"),o("Дневник на Промените")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Модули",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Модули"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плугини"===e[1]||"Теми"===e[1]||"Откъси"===e[1])||!t.snippets&&"Откъси"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Настройки":o="settings";break;case"Плугини":o="plugins";break;case"Теми":o="themes";break;case"Откъси":o="snippets";break;case"Дневник на Промените":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плугини"!==t[1]&&"Теми"!==t[1]&&"Откъси"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плугини"!==e.target.textContent&&"Теми"!==e.target.textContent&&"Откъси"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Дневник на Промените",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Модули"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Опреснявам","Обнови задължително","Тази настройка **изисква опресняване, за да влезе в сила**. Ти **може да изпитат някакво странно поведение** в тази сесия преди освежаване.")&&location.reload()};e.settings.createItem("Настройки",["",{type:"header",text:"Настройки"},{type:"toggle",text:"Дневник на промените на GooseMod",subtext:"Покажете настройката „Промяна на дневника“ на GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Основни разделители",subtext:"Показване на разделители между основните настройки на GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Магазин в началната страница",subtext:"Поставете опциите на магазина GooseMod в началната страница, а не в настройките",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"магазин"},{type:"toggle",text:"Автоматично актуализиране",subtext:"Автоматично обновяване на репозитории и модули на всеки час",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Известия за нов модул",subtext:"Показва тост при всяко добавяне на нов модул към Магазина",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Външен вид"},{type:"toggle",text:"Значки за GooseMod",subtext:"Покажи значките на GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Инструменти"},{type:"text-and-button",text:"Изчистване на кешовете",subtext:"Изчиства (напълно премахва) повечето кешове GooseMod използва",buttonText:"Прочистване",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Начална Обиколка",subtext:"Преминете през стартовата обиколка на GooseMod отново",buttonText:"Обиколка",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Копиране на информация за дебъгване",subtext:"Копиране на информация за настройката и GooseMod за отчитане и отстраняване на грешки",buttonText:"Копирай",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Нулиране на GooseMod",subtext:"Нулира GooseMod напълно: премахва всички предпочитания и модули; като при първоначална инсталация",buttonText:"Нулиране",onclick:async()=>{await e.confirmDialog("Проучване","Проучване GooseMod","Потвърждаването напълно ще нулира GooseMod, премахвайки всички предпочитания и модули; като че ли сте инсталирали GooseMod за първи път. Това е необратимо.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервно копие"},{type:"text-and-button",text:"Създаване на резервно копие",subtext:"Създава файл за резервно копие на вашите модули и настройки на GooseMod",buttonText:"Резервно копие",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Възстановяване на резервно копие",subtext:"Възстановете модулите и настройките на GooseMod чрез резервен файл, **възстановявайте резервни файлове, на които имате доверие**",buttonText:"Възстанови",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Промени",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Незначителни промени като малки промени в потребителския интерфейс, за да направите GooseMod такъв, какъвто ви харесва"},{type:"toggle",text:"Заместващо изображение",subtext:"Използване на заместващо изображение в магазина за модули без изображения",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Сгъваема категория Начало",subtext:"Позволете на началната категория да се сгъва чрез икона",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Експериментално",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Експерименталните настройки са най-вероятно недовършени и нестабилни, което може да доведе до бъгове и лоши преживявания"},{type:"toggle",experimental:!0,text:"Атрибути на данни",subtext:"Добавяне на атрибути за данни към някои елементи, които да се използват от някои теми",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Откъси",subtext:"Активиране на раздела \"Извадки\" в магазина",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Принудителни настройки на темата",subtext:"Принудителни автоматични генерирани настройки за всички теми",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Звезди",i="всичко",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Магазин":"Инсталиран";switch(r){case"А-Я":t.style.order="";break;case"Последно Обновен":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Звезди":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Магазин"!==n&&n!==p||"всичко"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Магазин";"Магазин"!==n&&"Инсталиран"!==n&&(n="Магазин"),o.forEach(t);const a=""===d&&"Магазин"===n&&"всичко"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Няма намерени резултати"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Няма намерени резултати",""!==d&&"Магазин"===n&&"всичко"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Не намерихме резултати,да нямаш в предвид плугини?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Не намерихме резултати,да нямаш в предвид теми?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Всички Теми"!==c.textContent&&"Всички Плугини"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плугини","Теми"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Търси Плугини":"Търси Теми",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортирай По",options:["Звезди","А-Я","Последно Обновен"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("всичко"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Най-харесвани",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Наскоро актуализирани",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Всички Плугини":"Всички Теми"},{type:"gm-footer"}]))),e.settings.createItem("Откъси",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Дневник на Промените",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Модули"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плугини"===e||"Теми"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Теми":"Плугини",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Магазин"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Магазин"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Магазин"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Магазин"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Премахване",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Инсталирай",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плугини"===e[1]||"Теми"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Премахване":"Инсталирай",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Спонсор","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Преводач","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Програмист","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Официалния Дискорд Сървър на GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Премахване"===this.props.buttonText?"Инсталирай":"Премахване",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Теми"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плугини"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Модули")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Отваряне на връзка"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Премахване"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Проверено",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Непотвърдено",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Без PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозитории"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Невалидно хранилище",{type:"error",timeout:5e3,subtext:"Невалиден формат"});if(!confirm("Външните репозитории представят рискове за сигурността ви, понеже те не се контролират от програмистите зад Goosemod. Не отговаряме за каквито и да е проблеми за репозитории добавени от потребители.\n\nАко не вярвате на собственика на това репо не го използвайте понеже може да компрометира вашата инсталация на Дискорд.\n\nМоля потвърдете добавянето на репото като натиснете OK."))return void goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"Отказан подкана за сигурност"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Това репо не е известно или доверено (без проверка на PGP), моля, бъдете допълнително внимателни. Уверете се, че имате доверие на собственика(ите) на това репо напълно.\n\nЗа да решите този проблем, помолете репо-поддържащата да добави Поддръжка на PGP.\n\nМоля, препотвърдете добавянето на това репо, като натиснете OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"Отказан подкана за сигурност"}):goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"PGP Неизвестна грешка"})}},"добавете")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Магазин"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Инсталиран")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Опресняване",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозитории",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Теми",confirmText:"Разгледай теми",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Разкрасявайте раздора си с теми"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Изписване от над 100 теми за ощипване и повишаване на вашия потребителски интерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плугини",confirmText:"Рагледайте плугини",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Усилване на вашия Discord под капака"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Приставките повишават опита ви с подобрения в самото приложение"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"магазин",confirmText:"Преглед на магазина в Начало",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Преглеждане на теми и плъгини в магазина"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod използва това е собствен Store, където лесно можете да се огледате и инсталирате"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Настройки",confirmText:"Преглед на настройките на GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Настройки-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Експериментални функции",description:"Пробвай нови експериментални функции"},{name:"Полезност",description:"Направете резервни копия, нулирайте GooseMod и още"},{name:"Ощипвам",description:"Ощипвам GooseMod към това как го искате"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Използвайте Настройките на GooseMod, за да персонализирате функциите, които са"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Има различни опции, които можете да променяте"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Общност",confirmText:"присъединете GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Попитай",description:"Задавайте всякакви въпроси и получете поддръжка"},{name:"Новини",description:"Получавай най-новите новини и съобщения за GooseМod и свързани проекти"},{name:"Включете се",description:"Помощ за предложения, подкрепа на други хора и други"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Присъединете се към Общността на GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Присъединете се към нашия Discord за допълнителна информация и още"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Научете повече",cancelText:"Не съм заинтересован",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"магазин",description:"Научете повече за магазина на GooseMod и какво има в него"},{name:"Настройки",description:"Научете повече за настройките на GooseMod и плугините"},{name:"Общност",description:"Присъединете се към нашия Discord, за да задавате въпроси, да давате обратна връзка, да следите новините и др"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Научете за GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Преминете през кратка обиколка през основните функции на GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плугини"===e[1])),themes:e.settings.items.find((e=>"Теми"===e[1])),snippets:e.settings.items.find((e=>"Откъси"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Теми"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Теми","themes"),id:"gm-home-themes",text:"Теми",selected:!1})),c(t.createElement(a,{style:{display:S||"Плугини"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плугини","plugins"),id:"gm-home-plugins",text:"Плугини",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Откъси"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Откъси","snippets"),id:"gm-home-snippets",text:"Откъси",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Откъси"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Премахване":"добавете",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="добавете",s.buttonText="добавете",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Премахване",s.buttonText="Премахване",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Настройки":o="settings";break;case"Плугини":o="plugins";break;case"Теми":o="themes";break;case"Откъси":o="snippets";break;case"Дневник на Промените":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Настройки"),t?void 0:o("Плугини"),t?void 0:o("Теми"),o("Дневник на Промените")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Модули",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Модули"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плугини"===e[1]||"Теми"===e[1]||"Откъси"===e[1])||!t.snippets&&"Откъси"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Настройки":o="settings";break;case"Плугини":o="plugins";break;case"Теми":o="themes";break;case"Откъси":o="snippets";break;case"Дневник на Промените":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плугини"!==t[1]&&"Теми"!==t[1]&&"Откъси"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плугини"!==e.target.textContent&&"Теми"!==e.target.textContent&&"Откъси"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Дневник на Промените",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Модули"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Опреснявам","Обнови задължително","Тази настройка **изисква опресняване, за да влезе в сила**. Ти **може да изпитат някакво странно поведение** в тази сесия преди освежаване.")&&location.reload()};e.settings.createItem("Настройки",["",{type:"header",text:"Настройки"},{type:"toggle",text:"Дневник на промените на GooseMod",subtext:"Покажете настройката „Промяна на дневника“ на GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Основни разделители",subtext:"Показване на разделители между основните настройки на GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Магазин в началната страница",subtext:"Поставете опциите на магазина GooseMod в началната страница, а не в настройките",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"магазин"},{type:"toggle",text:"Автоматично актуализиране",subtext:"Автоматично обновяване на репозитории и модули на всеки час",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Известия за нов модул",subtext:"Показва тост при всяко добавяне на нов модул към Магазина",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Външен вид"},{type:"toggle",text:"Значки за GooseMod",subtext:"Покажи значките на GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Инструменти"},{type:"text-and-button",text:"Изчистване на кешовете",subtext:"Изчиства (напълно премахва) повечето кешове GooseMod използва",buttonText:"Прочистване",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Начална Обиколка",subtext:"Преминете през стартовата обиколка на GooseMod отново",buttonText:"Обиколка",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Копиране на информация за дебъгване",subtext:"Копиране на информация за настройката и GooseMod за отчитане и отстраняване на грешки",buttonText:"Копирай",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Нулиране на GooseMod",subtext:"Нулира GooseMod напълно: премахва всички предпочитания и модули; като при първоначална инсталация",buttonText:"Нулиране",onclick:async()=>{await e.confirmDialog("Проучване","Проучване GooseMod","Потвърждаването напълно ще нулира GooseMod, премахвайки всички предпочитания и модули; като че ли сте инсталирали GooseMod за първи път. Това е необратимо.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервно копие"},{type:"text-and-button",text:"Създаване на резервно копие",subtext:"Създава файл за резервно копие на вашите модули и настройки на GooseMod",buttonText:"Резервно копие",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Възстановяване на резервно копие",subtext:"Възстановете модулите и настройките на GooseMod чрез резервен файл, **възстановявайте резервни файлове, на които имате доверие**",buttonText:"Възстанови",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Промени",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Незначителни промени като малки промени в потребителския интерфейс, за да направите GooseMod такъв, какъвто ви харесва"},{type:"toggle",text:"Заместващо изображение",subtext:"Използване на заместващо изображение в магазина за модули без изображения",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Сгъваема категория Начало",subtext:"Позволете на началната категория да се сгъва чрез икона",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Експериментално",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Експерименталните настройки са най-вероятно недовършени и нестабилни, което може да доведе до бъгове и лоши преживявания"},{type:"toggle",experimental:!0,text:"Атрибути на данни",subtext:"Добавяне на атрибути за данни към някои елементи, които да се използват от някои теми",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Откъси",subtext:"Активиране на раздела \"Извадки\" в магазина",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Принудителни настройки на темата",subtext:"Принудителни автоматични генерирани настройки за всички теми",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Звезди",i="всичко",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Магазин":"Инсталиран";switch(r){case"А-Я":t.style.order="";break;case"Последно Обновен":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Звезди":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Магазин"!==n&&n!==p||"всичко"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Магазин";"Магазин"!==n&&"Инсталиран"!==n&&(n="Магазин"),o.forEach(t);const a=""===d&&"Магазин"===n&&"всичко"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Няма намерени резултати"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Няма намерени резултати",""!==d&&"Магазин"===n&&"всичко"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Не намерихме резултати,да нямаш в предвид плугини?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Не намерихме резултати,да нямаш в предвид теми?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Всички Теми"!==c.textContent&&"Всички Плугини"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плугини","Теми"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Търси Плугини":"Търси Теми",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортирай По",options:["Звезди","А-Я","Последно Обновен"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("всичко"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Най-харесвани",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Наскоро актуализирани",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Всички Плугини":"Всички Теми"},{type:"gm-footer"}]))),e.settings.createItem("Откъси",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Дневник на Промените",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Модули"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плугини"===e||"Теми"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Теми":"Плугини",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Магазин"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Магазин"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Магазин"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Магазин"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Премахване",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Инсталирай",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плугини"===e[1]||"Теми"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Премахване":"Инсталирай",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Спонсор","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Преводач","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Програмист","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Официалния Дискорд Сървър на GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Премахване"===this.props.buttonText?"Инсталирай":"Премахване",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Теми"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плугини"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Модули")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Отваряне на връзка"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Премахване"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Проверено",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Непотвърдено",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Без PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозитории"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Невалидно хранилище",{type:"error",timeout:5e3,subtext:"Невалиден формат"});if(!confirm("Външните репозитории представят рискове за сигурността ви, понеже те не се контролират от програмистите зад Goosemod. Не отговаряме за каквито и да е проблеми за репозитории добавени от потребители.\n\nАко не вярвате на собственика на това репо не го използвайте понеже може да компрометира вашата инсталация на Дискорд.\n\nМоля потвърдете добавянето на репото като натиснете OK."))return void goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"Отказан подкана за сигурност"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Това репо не е известно или доверено (без проверка на PGP), моля, бъдете допълнително внимателни. Уверете се, че имате доверие на собственика(ите) на това репо напълно.\n\nЗа да решите този проблем, помолете репо-поддържащата да добави Поддръжка на PGP.\n\nМоля, препотвърдете добавянето на това репо, като натиснете OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"Отказан подкана за сигурност"}):goosemod.showToast("Отменено добавяне на хранилище",{type:"danger",timeout:5e3,subtext:"PGP Неизвестна грешка"})}},"добавете")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Магазин"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Инсталиран")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Опресняване",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозитории",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.cs.js b/goosemod.cs.js index c8f72798..bfe05b63 100644 --- a/goosemod.cs.js +++ b/goosemod.cs.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témata",confirmText:"Procházet témata",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zkrášli svůj Discord s tématy"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Vyber si z víc jak 100 témat pro zlepšení tvého rozhraní"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Procházet pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Vylepši svůj Discord v tajnosti"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy zlepšují tvoji zkušenost se zlepšením v aplikaci"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Obchod",confirmText:"Zobrazit Obchod v kartě domů",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procházet téma a pluginy v obchodě"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod používá vlastní obchod, ve kterém se můžeš jednoduše rozhlédnout a instalovat"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nastavení",confirmText:"Zobrazit nastavení GooseModu",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nastavení-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentální Funkce",description:"Vyzkoušejte nové experimentální funkce"},{name:"Utility",description:"Vytvoř zálohy, restartuj GooseMod a více"},{name:"Vychytávky",description:"Vychytej GooseMod tak, jak ho chceš"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Použij nastavení GooseModu pro přizpůsobení funkcí"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Je tu hodně nastavení, které můžeš změnit"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Komunita",confirmText:"Připojit se GooseMod discord server",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Zeptej se na otázky",description:"Zeptej se na jakékoliv otázky a dostaň podporu"},{name:"Novinky",description:"Dostaň nejnovější novinky o GooseModu a souvislými projekty"},{name:"Zapoj se",description:"Pomáhej s návrhy, podporou a více"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Připojit se na Komunitu GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Připoj se na náš Discord pro víc informací a mnoho dalšího"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Zjistit více",cancelText:"Nezajímá mě",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Obchod",description:"Zjistit více o Obchodu GooseMod a co v něm je"},{name:"Nastavení",description:"Zjistit o nastavení pro GooseMod a pluginy"},{name:"Komunita",description:"Připoj se na náš Discord pro dotazy, zpětnou vazbu, být aktualizovaný novinkama a víc"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zjistit více o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Jít přes krátkou ukázku přes hlavní funkce GooseModu"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Témata"===e[1])),snippets:e.settings.items.find((e=>"Snippety"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témata"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témata","themes"),id:"gm-home-themes",text:"Témata",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippety"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippety","snippets"),id:"gm-home-snippets",text:"Snippety",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippety"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Odebrat":"Přidat",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Přidat",s.buttonText="Přidat",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Odebrat",s.buttonText="Odebrat",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nastavení":o="settings";break;case"Pluginy":o="plugins";break;case"Témata":o="themes";break;case"Snippety":o="snippets";break;case"Seznam změn":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nastavení"),t?void 0:o("Pluginy"),t?void 0:o("Témata"),o("Seznam změn")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduly",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduly"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Témata"===e[1]||"Snippety"===e[1])||!t.snippets&&"Snippety"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nastavení":o="settings";break;case"Pluginy":o="plugins";break;case"Témata":o="themes";break;case"Snippety":o="snippets";break;case"Seznam změn":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Témata"!==t[1]&&"Snippety"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Témata"!==e.target.textContent&&"Snippety"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Seznam změn",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduly"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Obnovit","Potřebné obnovení","Toto nastavení **potřebuje obnovení aby působilo**. Můžeš **mít různé problémy** před obnovením.")&&location.reload()};e.settings.createItem("Nastavení",["",{type:"header",text:"Nastavení"},{type:"toggle",text:"GooseMod seznam změn",subtext:"Zobrazit Goosemod Seznam změn",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hlavní Oddělovače",subtext:"Zobrazit oddělovače mezi hlavními nastaveními goosemodu",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Obchod v kartě domů",subtext:"Přesunout Nastavení Obchodu GooseMod do karty domů místo nastavení",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Obchod"},{type:"toggle",text:"Automatické aktualizace",subtext:"Automaticky aktualizovat repozitáře a moduly každou hodinu",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Oznámení nových modulů",subtext:"Ukáže oznámení pokaždé, co je nový modul přidaný do obchodu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Vzhled"},{type:"toggle",text:"GooseMod odznaky",subtext:"Zobrazí GooseMod odznaky",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utility"},{type:"text-and-button",text:"Promazat dočasné soubory GooseModu",subtext:"Promaže většinu mezipaměti kterou GooseMod používá",buttonText:"Promazat Dočasné soubory",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Spustit prohlídku",subtext:"Znovu projít začáteční prohlídku GooseModu",buttonText:"Prohlídka",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopírovat ladící informace",subtext:"Zkopíruje informace o startu a GooseModu pro nahlášení a opravování chyb",buttonText:"Kopírovat",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetovat GooseMod",subtext:"Kompletně resetuje GooseMod: odstraní všechny nastavení a moduly jako kdyby jste ho poprvé nainstalovali",buttonText:"Resetovat",onclick:async()=>{await e.confirmDialog("Restartovat","Restartovat GooseMod","Potvrdění kompletně resetuje GooseMod, odstraní všechny nastavení a moduly; jako kdybyste si nainstalovali GooseMod poprvé. Tohle se nedá vrátit.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Záloha"},{type:"text-and-button",text:"Vytvořit zálohu",subtext:"Vytvoří zálohu vašich GooseMod nastavení a modulů",buttonText:"Záloha",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnovit ze zálohy",subtext:"Obnoví vaše GooseMod moduly a nastavení ze souboru zálohy, **obnovujte pouze zálohy kterým věříte!**",buttonText:"Obnovit",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Vychytávky",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Drobné změny jako např.malé úpravy UI aby byl GooseMod tak jak ho máte rádi"},{type:"toggle",text:"Zástupný obrázek",subtext:"Použít zástupný obrázek v obchodě pro moduly bez obrázků",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sklápěcí Domovská Kategorie",subtext:"Dovolit domovské kategorii být sklápěcí přes ikonu",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentální",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentální nastavení jsou většinou nehotová a nestabilní což by mohlo způsobit horší zkušenost používání goosemodu"},{type:"toggle",experimental:!0,text:"Atributy dat",subtext:"Přidat Atributy dat na použití pro některé elementy a některé témata/vzhledy",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Úryvky",subtext:"Povolit úryvky v obchodu",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Vynutit nastavení témat",subtext:"Vynutit automaticky vygenerované nastavení pro všechny témata",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Hvězdy",i="Všechny",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Obchod":"Nainstalované";switch(r){case"A-Z":t.style.order="";break;case"Poslední aktualizace":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Hvězdy":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Obchod"!==n&&n!==p||"Všechny"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Obchod";"Obchod"!==n&&"Nainstalované"!==n&&(n="Obchod"),o.forEach(t);const a=""===d&&"Obchod"===n&&"Všechny"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nebyly nalezeny žádné výsledky"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nebyly nalezeny žádné výsledky",""!==d&&"Obchod"===n&&"Všechny"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nebyly nalezeny žádné výsledky, nemysleli jste náhodou pluginy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nebyly nalezeny žádné výsledky, nechtěli jste náhodou hledat ve vzhledech/tématech?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Všechny témata/vzhledy"!==c.textContent&&"Všechny pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Témata"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hledat mezi pluginy":"Hledat mezi vzhledy/tématy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Seřadit",options:["Hvězdy","A-Z","Poslední aktualizace"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Všechny"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"S nejvíce hvězdami",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"S nedávnou aktualizací",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Všechny pluginy":"Všechny témata/vzhledy"},{type:"gm-footer"}]))),e.settings.createItem("Snippety",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Seznam změn",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduly"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Témata"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témata":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Obchod GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Obchod GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Odebrat",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalovat",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Témata"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Odebrat":"Instalovat",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseModu","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Překladatel GooseModu","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Vývojář GooseModu","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Officiální Discord server GooseModu","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Odebrat"===this.props.buttonText?"Instalovat":"Odebrat",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témata"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduly")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otevřít Odkaz"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Odebrat"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Ověřeno",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Nedůvěryhodný",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Žádné PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitáře"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neplatný repozitář",{type:"error",timeout:5e3,subtext:"Neplatný formát"});if(!confirm("Externí repozitáře mohou představovat bezpečnostní rizika protože nejsou ověřeny vývojáři GooseModu. Neneseme zodpovědnost za žádná nebezpečí z důvodu externích repozitářů přidaných uživateli.\n\nPokud nevěříte tomuto repozitáři nebo nejste vlastníkem toho repozitáře nepoužívejte ho protože by mohlo prolomit zabezpečení vaší instalace discordu.\n\nProsíme potvrďte přidání tohoto repozitáře kliknutím na tlačítko OK."))return void goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Odmítnutá zabezpečovací výzva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tento repozitář není znám ani ověření (žádné ověření PGP), prosím buďte extra opatrní. Dejte si pozor že kompletně věříte vlastníkům tohoto repozitáře.\n\nNa vyřešení tohoto problémů kontaktujte vlastníka repozitáře aby přidal podporu PGP.\n\nProsím znovu potvrďte přidání toho repozitáře kliknutím na tlačítko OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Odmítnutá zabezpečovací výzva"}):goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Nedůvěryhodné selhání PGP"})}},"Přidat")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Obchod"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Nainstalované")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Obnovit",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitáře",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témata",confirmText:"Procházet témata",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zkrášli svůj Discord s tématy"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Vyber si z víc jak 100 témat pro zlepšení tvého rozhraní"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Procházet pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Vylepši svůj Discord v tajnosti"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy zlepšují tvoji zkušenost se zlepšením v aplikaci"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Obchod",confirmText:"Zobrazit Obchod v kartě domů",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procházet téma a pluginy v obchodě"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod používá vlastní obchod, ve kterém se můžeš jednoduše rozhlédnout a instalovat"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nastavení",confirmText:"Zobrazit nastavení GooseModu",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nastavení-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentální Funkce",description:"Vyzkoušejte nové experimentální funkce"},{name:"Utility",description:"Vytvoř zálohy, restartuj GooseMod a více"},{name:"Vychytávky",description:"Vychytej GooseMod tak, jak ho chceš"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Použij nastavení GooseModu pro přizpůsobení funkcí"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Je tu hodně nastavení, které můžeš změnit"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Komunita",confirmText:"Připojit se GooseMod discord server",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Zeptej se na otázky",description:"Zeptej se na jakékoliv otázky a dostaň podporu"},{name:"Novinky",description:"Dostaň nejnovější novinky o GooseModu a souvislými projekty"},{name:"Zapoj se",description:"Pomáhej s návrhy, podporou a více"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Připojit se na Komunitu GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Připoj se na náš Discord pro víc informací a mnoho dalšího"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Zjistit více",cancelText:"Nezajímá mě",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Obchod",description:"Zjistit více o Obchodu GooseMod a co v něm je"},{name:"Nastavení",description:"Zjistit o nastavení pro GooseMod a pluginy"},{name:"Komunita",description:"Připoj se na náš Discord pro dotazy, zpětnou vazbu, být aktualizovaný novinkama a víc"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zjistit více o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Jít přes krátkou ukázku přes hlavní funkce GooseModu"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Témata"===e[1])),snippets:e.settings.items.find((e=>"Snippety"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témata"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témata","themes"),id:"gm-home-themes",text:"Témata",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippety"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippety","snippets"),id:"gm-home-snippets",text:"Snippety",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippety"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Odebrat":"Přidat",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Přidat",s.buttonText="Přidat",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Odebrat",s.buttonText="Odebrat",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nastavení":o="settings";break;case"Pluginy":o="plugins";break;case"Témata":o="themes";break;case"Snippety":o="snippets";break;case"Seznam změn":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nastavení"),t?void 0:o("Pluginy"),t?void 0:o("Témata"),o("Seznam změn")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduly",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduly"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Témata"===e[1]||"Snippety"===e[1])||!t.snippets&&"Snippety"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nastavení":o="settings";break;case"Pluginy":o="plugins";break;case"Témata":o="themes";break;case"Snippety":o="snippets";break;case"Seznam změn":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Témata"!==t[1]&&"Snippety"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Témata"!==e.target.textContent&&"Snippety"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Seznam změn",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduly"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Obnovit","Potřebné obnovení","Toto nastavení **potřebuje obnovení aby působilo**. Můžeš **mít různé problémy** před obnovením.")&&location.reload()};e.settings.createItem("Nastavení",["",{type:"header",text:"Nastavení"},{type:"toggle",text:"GooseMod seznam změn",subtext:"Zobrazit Goosemod Seznam změn",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hlavní Oddělovače",subtext:"Zobrazit oddělovače mezi hlavními nastaveními goosemodu",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Obchod v kartě domů",subtext:"Přesunout Nastavení Obchodu GooseMod do karty domů místo nastavení",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Obchod"},{type:"toggle",text:"Automatické aktualizace",subtext:"Automaticky aktualizovat repozitáře a moduly každou hodinu",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Oznámení nových modulů",subtext:"Ukáže oznámení pokaždé, co je nový modul přidaný do obchodu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Vzhled"},{type:"toggle",text:"GooseMod odznaky",subtext:"Zobrazí GooseMod odznaky",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utility"},{type:"text-and-button",text:"Promazat dočasné soubory GooseModu",subtext:"Promaže většinu mezipaměti kterou GooseMod používá",buttonText:"Promazat Dočasné soubory",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Spustit prohlídku",subtext:"Znovu projít začáteční prohlídku GooseModu",buttonText:"Prohlídka",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopírovat ladící informace",subtext:"Zkopíruje informace o startu a GooseModu pro nahlášení a opravování chyb",buttonText:"Kopírovat",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetovat GooseMod",subtext:"Kompletně resetuje GooseMod: odstraní všechny nastavení a moduly jako kdyby jste ho poprvé nainstalovali",buttonText:"Resetovat",onclick:async()=>{await e.confirmDialog("Restartovat","Restartovat GooseMod","Potvrdění kompletně resetuje GooseMod, odstraní všechny nastavení a moduly; jako kdybyste si nainstalovali GooseMod poprvé. Tohle se nedá vrátit.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Záloha"},{type:"text-and-button",text:"Vytvořit zálohu",subtext:"Vytvoří zálohu vašich GooseMod nastavení a modulů",buttonText:"Záloha",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnovit ze zálohy",subtext:"Obnoví vaše GooseMod moduly a nastavení ze souboru zálohy, **obnovujte pouze zálohy kterým věříte!**",buttonText:"Obnovit",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Vychytávky",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Drobné změny jako např.malé úpravy UI aby byl GooseMod tak jak ho máte rádi"},{type:"toggle",text:"Zástupný obrázek",subtext:"Použít zástupný obrázek v obchodě pro moduly bez obrázků",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sklápěcí Domovská Kategorie",subtext:"Dovolit domovské kategorii být sklápěcí přes ikonu",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentální",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentální nastavení jsou většinou nehotová a nestabilní což by mohlo způsobit horší zkušenost používání goosemodu"},{type:"toggle",experimental:!0,text:"Atributy dat",subtext:"Přidat Atributy dat na použití pro některé elementy a některé témata/vzhledy",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Úryvky",subtext:"Povolit úryvky v obchodu",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Vynutit nastavení témat",subtext:"Vynutit automaticky vygenerované nastavení pro všechny témata",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Hvězdy",i="Všechny",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Obchod":"Nainstalované";switch(r){case"A-Z":t.style.order="";break;case"Poslední aktualizace":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Hvězdy":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Obchod"!==n&&n!==p||"Všechny"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Obchod";"Obchod"!==n&&"Nainstalované"!==n&&(n="Obchod"),o.forEach(t);const a=""===d&&"Obchod"===n&&"Všechny"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nebyly nalezeny žádné výsledky"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nebyly nalezeny žádné výsledky",""!==d&&"Obchod"===n&&"Všechny"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nebyly nalezeny žádné výsledky, nemysleli jste náhodou pluginy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nebyly nalezeny žádné výsledky, nechtěli jste náhodou hledat ve vzhledech/tématech?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Všechny témata/vzhledy"!==c.textContent&&"Všechny pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Témata"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hledat mezi pluginy":"Hledat mezi vzhledy/tématy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Seřadit",options:["Hvězdy","A-Z","Poslední aktualizace"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Všechny"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"S nejvíce hvězdami",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"S nedávnou aktualizací",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Všechny pluginy":"Všechny témata/vzhledy"},{type:"gm-footer"}]))),e.settings.createItem("Snippety",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Seznam změn",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduly"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Témata"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témata":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Obchod GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Obchod GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Odebrat",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalovat",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Témata"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Odebrat":"Instalovat",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseModu","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Překladatel GooseModu","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Vývojář GooseModu","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Officiální Discord server GooseModu","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Odebrat"===this.props.buttonText?"Instalovat":"Odebrat",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témata"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduly")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otevřít Odkaz"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Odebrat"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Ověřeno",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Nedůvěryhodný",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Žádné PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitáře"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neplatný repozitář",{type:"error",timeout:5e3,subtext:"Neplatný formát"});if(!confirm("Externí repozitáře mohou představovat bezpečnostní rizika protože nejsou ověřeny vývojáři GooseModu. Neneseme zodpovědnost za žádná nebezpečí z důvodu externích repozitářů přidaných uživateli.\n\nPokud nevěříte tomuto repozitáři nebo nejste vlastníkem toho repozitáře nepoužívejte ho protože by mohlo prolomit zabezpečení vaší instalace discordu.\n\nProsíme potvrďte přidání tohoto repozitáře kliknutím na tlačítko OK."))return void goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Odmítnutá zabezpečovací výzva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tento repozitář není znám ani ověření (žádné ověření PGP), prosím buďte extra opatrní. Dejte si pozor že kompletně věříte vlastníkům tohoto repozitáře.\n\nNa vyřešení tohoto problémů kontaktujte vlastníka repozitáře aby přidal podporu PGP.\n\nProsím znovu potvrďte přidání toho repozitáře kliknutím na tlačítko OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Odmítnutá zabezpečovací výzva"}):goosemod.showToast("Přidání repozitáře bylo zrušeno",{type:"danger",timeout:5e3,subtext:"Nedůvěryhodné selhání PGP"})}},"Přidat")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Obchod"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Nainstalované")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Obnovit",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitáře",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.da.js b/goosemod.da.js index c2c55c50..1bb0f914 100644 --- a/goosemod.da.js +++ b/goosemod.da.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temaer",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butik",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Indstillinger",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Indstillinger-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Fælleskab",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butik",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Indstillinger",description:"Find out about the settings for GooseMod and plugins"},{name:"Fælleskab",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temaer"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temaer"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temaer","themes"),id:"gm-home-themes",text:"Temaer",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Fjern":"Tilføj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Tilføj",s.buttonText="Tilføj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Fjern",s.buttonText="Fjern",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Indstillinger":o="settings";break;case"Plugins":o="plugins";break;case"Temaer":o="themes";break;case"Snippets":o="snippets";break;case"Ændringer":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Indstillinger"),t?void 0:o("Plugins"),t?void 0:o("Temaer"),o("Ændringer")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temaer"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Indstillinger":o="settings";break;case"Plugins":o="plugins";break;case"Temaer":o="themes";break;case"Snippets":o="snippets";break;case"Ændringer":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temaer"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temaer"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Ændringer",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Indstillinger",["",{type:"header",text:"Indstillinger"},{type:"toggle",text:"GooseMod Ændringer",subtext:"Hvis GooseMod Ændringer",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hoved Seperatere",subtext:"Hvis separatoren mellem hoved GooseMod indstillinger",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butik i Hjem",subtext:"Put GooseMod Butiksindstilinger i hjem i stedet for indstillinger",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butik"},{type:"toggle",text:"Automatiskopdatering",subtext:"Automatisk opdatere kodespoter verd time",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Udseéne"},{type:"toggle",text:"GooseMod Badges",subtext:"Hvis GooseMods Badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Hjælpeværktøjer"},{type:"text-and-button",text:"Fjern Cache",subtext:"Fjern alt cache fra GooseMod bruger",buttonText:"Fjern",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start tur",subtext:"Start GooseMod\'s startup tur igen",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopier Debug Information",subtext:"Kopiere Information om setup og GooseMod for rapportering og debugging",buttonText:"Kopier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Nulstild GooseMod",subtext:"Nulstiller Alle GooseMod Indstillinger og Moduler, som en ny installation.",buttonText:"Nulstild",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Opret Backup",subtext:"Opretter en fil til backup af dine GooseMod Moduler og indstillinger.",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Gennopret fra Backup",subtext:"Genopretter dine GooseMod Moduler og instillinger med en Backup fil. **Genopret kun fra filer af folk, du stoler på**",buttonText:"Genopret",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mindre ændringer, f.eks. små UI ændringer for at GooseMod lige som du vil have det"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentelle Indstillinger",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentale indstillinger er ikke altid kompatible eller stabile, som kan resultere i fejl."},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjerner",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butik":"Installeret";switch(r){case"A-Å":t.style.order="";break;case"Sidst Opdateret":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjerner":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butik"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butik";"Butik"!==n&&"Installeret"!==n&&(n="Butik"),o.forEach(t);const a=""===d&&"Butik"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ingen resultater"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ingen resultater",""!==d&&"Butik"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ingen resultater, mente du plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ingen resultater, mente du temaer?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Temaer"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temaer"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Søg i Plugins":"Søg i Temaer",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorter efter",options:["Stjerner","A-Å","Sidst Opdateret"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Forfatter",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Fleste stjerner",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Opdateret fornyligt",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Temaer"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Ændringer",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temaer"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temaer":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Butik"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Butik"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Butik"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Butik"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Fjern",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temaer"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Fjern":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Officiel Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Fjern"===this.props.buttonText?"Installer":"Fjern",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temaer"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Fjern"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP verificeret",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP upålidelige",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositorier"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ugyldigt Kodedepot",{type:"error",timeout:5e3,subtext:"Ugyldigt kodeformat"});if(!confirm("Eksterne kodedepoter kan være en sikkerhedsrisiko, da de ikke er kontrollerede af GooseMods\'s udviklere. Vi er ikke ansvarlige for noget skade på grund af en eksterne kodedepoter tilføjede af andre brugere.\n\nHvis du ikke stoler på ejeren af dette plugin eller tema, så anbefaler vi at det ikke bruges, da det kan kompromiserne din Discord bruger.\n\nfor at bekræfte installationen af dette, tryk på OK"))return void goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"Nægtede Sikkerheds Prompte"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Dette kodedepot er ikke kændt, eller understøttet (Ingen PGP Verifikation) Vær extra forsigtig. Vær sikker på, at du stoler på ejerne af dette.\n\nFor at rette dette, hvis det er en fejl, spørg venligst ejerne af kodedepotet om at tilføje PGP understøttelse.\n\nfor at bekræfte installationen af dette, tryk på OK")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"Nægtede Sikkerheds Prompte"}):goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"PGP Upålidelig Fejl"})}},"Tilføj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butik"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installeret")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Opdater",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositorier",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temaer",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butik",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Indstillinger",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Indstillinger-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Fælleskab",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butik",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Indstillinger",description:"Find out about the settings for GooseMod and plugins"},{name:"Fælleskab",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temaer"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temaer"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temaer","themes"),id:"gm-home-themes",text:"Temaer",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Fjern":"Tilføj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Tilføj",s.buttonText="Tilføj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Fjern",s.buttonText="Fjern",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Indstillinger":o="settings";break;case"Plugins":o="plugins";break;case"Temaer":o="themes";break;case"Snippets":o="snippets";break;case"Ændringer":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Indstillinger"),t?void 0:o("Plugins"),t?void 0:o("Temaer"),o("Ændringer")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temaer"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Indstillinger":o="settings";break;case"Plugins":o="plugins";break;case"Temaer":o="themes";break;case"Snippets":o="snippets";break;case"Ændringer":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temaer"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temaer"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Ændringer",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Indstillinger",["",{type:"header",text:"Indstillinger"},{type:"toggle",text:"GooseMod Ændringer",subtext:"Hvis GooseMod Ændringer",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hoved Seperatere",subtext:"Hvis separatoren mellem hoved GooseMod indstillinger",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butik i Hjem",subtext:"Put GooseMod Butiksindstilinger i hjem i stedet for indstillinger",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butik"},{type:"toggle",text:"Automatiskopdatering",subtext:"Automatisk opdatere kodespoter verd time",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Udseéne"},{type:"toggle",text:"GooseMod Badges",subtext:"Hvis GooseMods Badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Hjælpeværktøjer"},{type:"text-and-button",text:"Fjern Cache",subtext:"Fjern alt cache fra GooseMod bruger",buttonText:"Fjern",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start tur",subtext:"Start GooseMod\'s startup tur igen",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopier Debug Information",subtext:"Kopiere Information om setup og GooseMod for rapportering og debugging",buttonText:"Kopier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Nulstild GooseMod",subtext:"Nulstiller Alle GooseMod Indstillinger og Moduler, som en ny installation.",buttonText:"Nulstild",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Opret Backup",subtext:"Opretter en fil til backup af dine GooseMod Moduler og indstillinger.",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Gennopret fra Backup",subtext:"Genopretter dine GooseMod Moduler og instillinger med en Backup fil. **Genopret kun fra filer af folk, du stoler på**",buttonText:"Genopret",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mindre ændringer, f.eks. små UI ændringer for at GooseMod lige som du vil have det"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentelle Indstillinger",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentale indstillinger er ikke altid kompatible eller stabile, som kan resultere i fejl."},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjerner",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butik":"Installeret";switch(r){case"A-Å":t.style.order="";break;case"Sidst Opdateret":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjerner":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butik"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butik";"Butik"!==n&&"Installeret"!==n&&(n="Butik"),o.forEach(t);const a=""===d&&"Butik"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ingen resultater"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ingen resultater",""!==d&&"Butik"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ingen resultater, mente du plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ingen resultater, mente du temaer?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Temaer"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temaer"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Søg i Plugins":"Søg i Temaer",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorter efter",options:["Stjerner","A-Å","Sidst Opdateret"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Forfatter",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Fleste stjerner",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Opdateret fornyligt",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Temaer"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Ændringer",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temaer"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temaer":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Butik"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Butik"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Butik"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Butik"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Fjern",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temaer"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Fjern":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Officiel Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Fjern"===this.props.buttonText?"Installer":"Fjern",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temaer"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Fjern"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP verificeret",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP upålidelige",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositorier"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ugyldigt Kodedepot",{type:"error",timeout:5e3,subtext:"Ugyldigt kodeformat"});if(!confirm("Eksterne kodedepoter kan være en sikkerhedsrisiko, da de ikke er kontrollerede af GooseMods\'s udviklere. Vi er ikke ansvarlige for noget skade på grund af en eksterne kodedepoter tilføjede af andre brugere.\n\nHvis du ikke stoler på ejeren af dette plugin eller tema, så anbefaler vi at det ikke bruges, da det kan kompromiserne din Discord bruger.\n\nfor at bekræfte installationen af dette, tryk på OK"))return void goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"Nægtede Sikkerheds Prompte"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Dette kodedepot er ikke kændt, eller understøttet (Ingen PGP Verifikation) Vær extra forsigtig. Vær sikker på, at du stoler på ejerne af dette.\n\nFor at rette dette, hvis det er en fejl, spørg venligst ejerne af kodedepotet om at tilføje PGP understøttelse.\n\nfor at bekræfte installationen af dette, tryk på OK")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"Nægtede Sikkerheds Prompte"}):goosemod.showToast("Annullerede Installation af Kodedepot",{type:"danger",timeout:5e3,subtext:"PGP Upålidelig Fejl"})}},"Tilføj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butik"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installeret")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Opdater",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositorier",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.de.js b/goosemod.de.js index e456443c..054edad0 100644 --- a/goosemod.de.js +++ b/goosemod.de.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Durchsuche Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verschönere dein Discord mit Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Wähle aus über 100 Themes, um deine Benutzeroberfläche zu optimieren und zu verbessern"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Durchsuche Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verbessere dein Discord unter der Haube"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins erweitern dein Erlebnis mit Verbesserungen in der App selbst"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Laden",confirmText:"Store in Home anzeigen",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Themes und Plugins im Store durchsuchen"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod verwendet einen eigenen Store, in dem du dich einfach umsehen und Module installieren kannst"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Einstellungen",confirmText:"GooseMod Einstellungen Anzeigen",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Einstellungen-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentelle Funktionen",description:"Probiere neue experimentelle Funktionen aus"},{name:"Werkzeuge",description:"Erstelle Sicherungen, setze Goose-Mod zurück und mehr"},{name:"Tweaks",description:"Passe GooseMod so an, wie du möchtest"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verwende die Einstellungen von GooseMod, um die Funktionen anzupassen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Es gibt verschiedene Optionen für dich zu ändern"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemeinschaft",confirmText:"Trete dem GooseMod Discord bei",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fragen stellen",description:"Stelle eine Frage und bekomme Hilfe"},{name:"Neuigkeiten",description:"Erhalte die neuesten Neuigkeiten und Ankündigungen zu GooseMod und verwandten Projekten"},{name:"Mach mit",description:"Helfe mit Vorschlägen, unterstütze andere, und mehr"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Trete der GooseMod-Community bei"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Tritt unserem Discord bei für weitere Informationen und mehr"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Mehr Erfahren",cancelText:"Nicht Interessiert",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Laden",description:"Erfahre mehr über GooseMod\'s Store und dessen Inhalt"},{name:"Einstellungen",description:"Mehr über die Einstellungen für GooseMod und Plugins erfahren"},{name:"Gemeinschaft",description:"Joine unserem Discord um Fragen zu stellen, Feedback abzugeben, auf dem neusten Stand zu sein und mehr"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Erfahre mehr über GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Mache eine kleine Tour durch GooseMod\'s Kernfunktionen"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Entfernen":"Hinzufügen",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Hinzufügen",s.buttonText="Hinzufügen",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Entfernen",s.buttonText="Entfernen",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Einstellungen":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Änderungsprotokoll":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Einstellungen"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Änderungsprotokoll")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Module",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Module"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Einstellungen":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Änderungsprotokoll":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Änderungsprotokoll",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Module"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Neu laden","Neu laden erforderlich","Diese Einstellung **erfordert neu laden um wirksam zu werden**. Du **könntest seltsames Verhalten** in dieser Sitzung feststellen bevor du neu geladen hast.")&&location.reload()};e.settings.createItem("Einstellungen",["",{type:"header",text:"Einstellungen"},{type:"toggle",text:"GooseMod Änderungsprotokoll",subtext:"Zeige GooseMod \"Änderungsprotokoll\" Einstellung",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Haupttrennzeichen",subtext:"Zeige Seperatoren zwischen Haupt-GooseMod Einstellungen",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Platziert die GooseMod Store Optionen in Home anstatt in den Einstellungen",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Laden"},{type:"toggle",text:"Auto Aktualisierung",subtext:"Aktualisiert automatisch Repos und Module jede Stunde",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Benachrichtigung über neue Module",subtext:"Zeigt eine Toast-Benachrichtigung an, wenn ein neues Modul zum Store hinzugefügt wurde",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aussehen"},{type:"toggle",text:"GooseMod Badges",subtext:"Zeigt GooseMod\'s Badges an",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Caches leeren",subtext:"Reinigt (entfernt komplett) die meisten Caches die GooseMod benutzt",buttonText:"Bereinigen",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Tour Starten",subtext:"Gehe erneut durch GooseMod\'s startup Tour",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiere Debug Info",subtext:"Kopiert Information vom Setup und GooseMod fürs reporten und debuggen",buttonText:"Kopieren",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod Zurücksetzen",subtext:"Setzt GooseMod komplett zurück: Entfernt alle Preferenzen und Module; wie eine erstmalige Installation",buttonText:"Zurücksetzen",onclick:async()=>{await e.confirmDialog("Zurücksetzen","GooseMod zurücksetzen","Nach der Bestätigung wird GooseMod vollständig zurückgesetzt und alle Einstellungen und Module werden entfernt; so als ob du GooseMod zum ersten Mal installiert hättest. Dies kann nicht rückgängig gemacht werden.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sichern"},{type:"text-and-button",text:"Sicherung Erstellen",subtext:"Erstellt eine Datei zum sichern deiner GooseMod Module und Einstellungen",buttonText:"Sichern",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Sicherung Wiederherstellen",subtext:"Stellt deine GooseMod Module und Einstellungen via eine Sicherungs-Datei her, **stelle nur Sicherungen wieder her denen du vertraust**",buttonText:"Wiederherstellen",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Geringfügige Änderungen wie kleine UI-Änderungen, um GooseMod so zu gestalten, wie du es möchtest"},{type:"toggle",text:"Platzhalter-Bild",subtext:"Verwendung eines Platzhalterbildes im Store für Module ohne Bilder",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Zusammenklappbare Home-Kategorie",subtext:"Lasse die Home-Kategorie einklappen via Icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentell",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentelle Einstellungen sind wahrscheinlich unvollständig und instabil, was zu einer geringeren Erfahrung führen kann"},{type:"toggle",experimental:!0,text:"Daten Attribute",subtext:"Fügt Daten Attribute zu manchen Elementen hinzu, für Themes zum nutzen",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Aktiviere den Snippets Tab im Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Theme Einstellungen Erzwingen",subtext:"Erzwinge auto-generierte Einstellungen für alle Themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Sternen",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installiert";switch(r){case"A-Z":t.style.order="";break;case"Zuletzt aktualisiert":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Sternen":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installiert"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Keine Ergebnisse gefunden"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Keine Ergebnisse gefunden",""!==d&&"Store"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Kein Ergebnis gefunden, meinst du Plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Kein Ergebnis gefunden, meinst du Themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Themes"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Durchsuche Plugins":"Themes durchsuchen",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortieren nach",options:["Sternen","A-Z","Zuletzt aktualisiert"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Am meisten Sterne",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Zuletzt aktualisiert",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Änderungsprotokoll",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Module"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Entfernen",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installieren",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Entfernen":"Installieren",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Übersetzer","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Entwickler","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod offizieller Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Entfernen"===this.props.buttonText?"Installieren":"Entfernen",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Module")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Link öffnen"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Entfernen"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP verifiziert",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ungültig",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Kein PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ungültiges Repo",{type:"error",timeout:5e3,subtext:"Ungültiges Format"});if(!confirm("Externe Repos weißen Sicherheitsprobleme auf, weil sie nicht von den GooseMod Entwicklern kontrolliert werden. Wir sind nicht verantwortlich für irgendwelche Gefahren durch externe Repos die von Nutzern hinzugefügt wurden.\n\nWenn du dem Besitzer dieses Repos nicht vertraust, verwende es nicht, da es deine Discord-Installation gefährden könnte.\n\nBitte bestätige das Hinzufügen dieses Repos durch Drücken von OK."))return void goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"Verweigerte Sicherheitsabfrage"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Dieses Repo ist nicht bekannt oder vertrauenswürdig (keine PGP-Verifizierung), bitte sei besonders vorsichtig. Stelle sicher, dass du dem/den Eigentümer(n) dieses Repos vollständig vertraust.\n\nUm dieses Problem zu lösen, bitte den Repo-Maintainer, PGP-Unterstützung hinzuzufügen.\n\nBitte bestätige das Hinzufügen dieses Repos durch Drücken von OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"Verweigerte Sicherheitsabfrage"}):goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Fehler"})}},"Hinzufügen")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installiert")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Neu laden",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Durchsuche Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verschönere dein Discord mit Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Wähle aus über 100 Themes, um deine Benutzeroberfläche zu optimieren und zu verbessern"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Durchsuche Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verbessere dein Discord unter der Haube"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins erweitern dein Erlebnis mit Verbesserungen in der App selbst"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Laden",confirmText:"Store in Home anzeigen",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Themes und Plugins im Store durchsuchen"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod verwendet einen eigenen Store, in dem du dich einfach umsehen und Module installieren kannst"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Einstellungen",confirmText:"GooseMod Einstellungen Anzeigen",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Einstellungen-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentelle Funktionen",description:"Probiere neue experimentelle Funktionen aus"},{name:"Werkzeuge",description:"Erstelle Sicherungen, setze Goose-Mod zurück und mehr"},{name:"Tweaks",description:"Passe GooseMod so an, wie du möchtest"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verwende die Einstellungen von GooseMod, um die Funktionen anzupassen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Es gibt verschiedene Optionen für dich zu ändern"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemeinschaft",confirmText:"Trete dem GooseMod Discord bei",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fragen stellen",description:"Stelle eine Frage und bekomme Hilfe"},{name:"Neuigkeiten",description:"Erhalte die neuesten Neuigkeiten und Ankündigungen zu GooseMod und verwandten Projekten"},{name:"Mach mit",description:"Helfe mit Vorschlägen, unterstütze andere, und mehr"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Trete der GooseMod-Community bei"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Tritt unserem Discord bei für weitere Informationen und mehr"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Mehr Erfahren",cancelText:"Nicht Interessiert",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Laden",description:"Erfahre mehr über GooseMod\'s Store und dessen Inhalt"},{name:"Einstellungen",description:"Mehr über die Einstellungen für GooseMod und Plugins erfahren"},{name:"Gemeinschaft",description:"Joine unserem Discord um Fragen zu stellen, Feedback abzugeben, auf dem neusten Stand zu sein und mehr"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Erfahre mehr über GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Mache eine kleine Tour durch GooseMod\'s Kernfunktionen"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Entfernen":"Hinzufügen",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Hinzufügen",s.buttonText="Hinzufügen",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Entfernen",s.buttonText="Entfernen",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Einstellungen":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Änderungsprotokoll":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Einstellungen"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Änderungsprotokoll")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Module",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Module"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Einstellungen":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Änderungsprotokoll":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Änderungsprotokoll",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Module"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Neu laden","Neu laden erforderlich","Diese Einstellung **erfordert neu laden um wirksam zu werden**. Du **könntest seltsames Verhalten** in dieser Sitzung feststellen bevor du neu geladen hast.")&&location.reload()};e.settings.createItem("Einstellungen",["",{type:"header",text:"Einstellungen"},{type:"toggle",text:"GooseMod Änderungsprotokoll",subtext:"Zeige GooseMod \"Änderungsprotokoll\" Einstellung",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Haupttrennzeichen",subtext:"Zeige Seperatoren zwischen Haupt-GooseMod Einstellungen",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Platziert die GooseMod Store Optionen in Home anstatt in den Einstellungen",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Laden"},{type:"toggle",text:"Auto Aktualisierung",subtext:"Aktualisiert automatisch Repos und Module jede Stunde",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Benachrichtigung über neue Module",subtext:"Zeigt eine Toast-Benachrichtigung an, wenn ein neues Modul zum Store hinzugefügt wurde",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aussehen"},{type:"toggle",text:"GooseMod Badges",subtext:"Zeigt GooseMod\'s Badges an",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Caches leeren",subtext:"Reinigt (entfernt komplett) die meisten Caches die GooseMod benutzt",buttonText:"Bereinigen",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Tour Starten",subtext:"Gehe erneut durch GooseMod\'s startup Tour",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiere Debug Info",subtext:"Kopiert Information vom Setup und GooseMod fürs reporten und debuggen",buttonText:"Kopieren",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod Zurücksetzen",subtext:"Setzt GooseMod komplett zurück: Entfernt alle Preferenzen und Module; wie eine erstmalige Installation",buttonText:"Zurücksetzen",onclick:async()=>{await e.confirmDialog("Zurücksetzen","GooseMod zurücksetzen","Nach der Bestätigung wird GooseMod vollständig zurückgesetzt und alle Einstellungen und Module werden entfernt; so als ob du GooseMod zum ersten Mal installiert hättest. Dies kann nicht rückgängig gemacht werden.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sichern"},{type:"text-and-button",text:"Sicherung Erstellen",subtext:"Erstellt eine Datei zum sichern deiner GooseMod Module und Einstellungen",buttonText:"Sichern",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Sicherung Wiederherstellen",subtext:"Stellt deine GooseMod Module und Einstellungen via eine Sicherungs-Datei her, **stelle nur Sicherungen wieder her denen du vertraust**",buttonText:"Wiederherstellen",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Geringfügige Änderungen wie kleine UI-Änderungen, um GooseMod so zu gestalten, wie du es möchtest"},{type:"toggle",text:"Platzhalter-Bild",subtext:"Verwendung eines Platzhalterbildes im Store für Module ohne Bilder",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Zusammenklappbare Home-Kategorie",subtext:"Lasse die Home-Kategorie einklappen via Icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentell",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentelle Einstellungen sind wahrscheinlich unvollständig und instabil, was zu einer geringeren Erfahrung führen kann"},{type:"toggle",experimental:!0,text:"Daten Attribute",subtext:"Fügt Daten Attribute zu manchen Elementen hinzu, für Themes zum nutzen",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Aktiviere den Snippets Tab im Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Theme Einstellungen Erzwingen",subtext:"Erzwinge auto-generierte Einstellungen für alle Themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Sternen",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installiert";switch(r){case"A-Z":t.style.order="";break;case"Zuletzt aktualisiert":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Sternen":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installiert"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Keine Ergebnisse gefunden"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Keine Ergebnisse gefunden",""!==d&&"Store"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Kein Ergebnis gefunden, meinst du Plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Kein Ergebnis gefunden, meinst du Themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Themes"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Durchsuche Plugins":"Themes durchsuchen",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortieren nach",options:["Sternen","A-Z","Zuletzt aktualisiert"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Am meisten Sterne",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Zuletzt aktualisiert",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Änderungsprotokoll",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Module"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Entfernen",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installieren",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Entfernen":"Installieren",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Übersetzer","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Entwickler","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod offizieller Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Entfernen"===this.props.buttonText?"Installieren":"Entfernen",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Module")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Link öffnen"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Entfernen"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP verifiziert",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ungültig",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Kein PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ungültiges Repo",{type:"error",timeout:5e3,subtext:"Ungültiges Format"});if(!confirm("Externe Repos weißen Sicherheitsprobleme auf, weil sie nicht von den GooseMod Entwicklern kontrolliert werden. Wir sind nicht verantwortlich für irgendwelche Gefahren durch externe Repos die von Nutzern hinzugefügt wurden.\n\nWenn du dem Besitzer dieses Repos nicht vertraust, verwende es nicht, da es deine Discord-Installation gefährden könnte.\n\nBitte bestätige das Hinzufügen dieses Repos durch Drücken von OK."))return void goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"Verweigerte Sicherheitsabfrage"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Dieses Repo ist nicht bekannt oder vertrauenswürdig (keine PGP-Verifizierung), bitte sei besonders vorsichtig. Stelle sicher, dass du dem/den Eigentümer(n) dieses Repos vollständig vertraust.\n\nUm dieses Problem zu lösen, bitte den Repo-Maintainer, PGP-Unterstützung hinzuzufügen.\n\nBitte bestätige das Hinzufügen dieses Repos durch Drücken von OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"Verweigerte Sicherheitsabfrage"}):goosemod.showToast("Hinzufügen des Repos abgebrochen",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Fehler"})}},"Hinzufügen")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installiert")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Neu laden",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.el.js b/goosemod.el.js index ecbd000d..25056977 100644 --- a/goosemod.el.js +++ b/goosemod.el.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Θέματα",confirmText:"Περιήγηση Θεμάτων",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ομόρφυνε το Discord σου με Θέματα"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Διάλεξε σε περισσότερα απο 100 θέματα να τροποποιήσεις και να βελτιώσεις την διεπαφή χρήστη"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Πρόσθετα",confirmText:"Περιήγηση Προσθέτων",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ενίσχυσε το Discord κάτω από την επιφάνεια"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Τα πρόσθετα αυξάνουν την εμπειρία σας με βελτιώσεις της εφαρμογής"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Κατάστημα",confirmText:"Προβολή καταστήματος στην Αρχική",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Περιήγηση θεμάτων και προσθέτων στο Κατάστημα"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"Το GooseMod χρησιμοποιεί το δικό του Κατάστημα, στο οποίο μπορεί να γίνει εύκολη περιήγηση και εγκατάσταση"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ρυθμίσεις",confirmText:"Δες τις ρυθμίσεις GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ρυθμίσεις-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Πειραματικές Λειτουργίες",description:"Δοκίμασε νέες πειραματικές λειτουργίες"},{name:"Υπηρεσίες",description:"Δημιουργία αντιγράφου ασφαλείας, επαναφορά GooseMod και περισσότερα"},{name:"Μικροδιορθώσεις",description:"Ρύθμισε το GooseMod όπως ακριβώς το θες"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Χρησιμοποίησε τις ρυθμίσεις του GooseMod για να εξατομικεύσεις τα χαρακτηριστικά του"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Υπάρχουν διάφορες επιλογές να αλλάξεις"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Κοινότητα",confirmText:"Γίνε μέλος του GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Κάντε Ερωτήσεις",description:"Κάντε οποιαδήποτε ερώτηση και λάβετε υποστήριξη"},{name:"Νέα",description:"Λάβε τα τελευταία νέα και ανακοινώσεις γύρω απο το GooseMod και σχετικά πρότζεκτ"},{name:"Συμμετέχετε",description:"Βοήθα με υποδείξεις, υποστήριξη και περισσότερα"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Γίνε μέλος της κοινότητας GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Γίνε μέλος του Discord για περαιτέρω πληροφορίες και περισσότερα"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Μάθε Περισσότερα",cancelText:"Δεν ενδιαφέρομαι",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Κατάστημα",description:"Μάθε για το GooseMod και τα περιεχόμενα του"},{name:"Ρυθμίσεις",description:"Μάθε για τις ρυθμίσεις του GooseMod και τα πρόσθετα"},{name:"Κοινότητα",description:"Γίνε μέλος στο Discord μας για να κάνεις ερωτήσεις, επικοδομητική κριτική, να μείνεις ενημερωμένος με τα νεα και πολλα περισσότερα"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Μάθε για το GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ολοκλήρωσε μια σύντομη περιήγηση σχετικά με τις βασικές λειτουργίες του GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Πρόσθετα"===e[1])),themes:e.settings.items.find((e=>"Θέματα"===e[1])),snippets:e.settings.items.find((e=>"Αποσπάσματα"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Θέματα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Θέματα","themes"),id:"gm-home-themes",text:"Θέματα",selected:!1})),c(t.createElement(a,{style:{display:S||"Πρόσθετα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Πρόσθετα","plugins"),id:"gm-home-plugins",text:"Πρόσθετα",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Αποσπάσματα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Αποσπάσματα","snippets"),id:"gm-home-snippets",text:"Αποσπάσματα",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Αποσπάσματα"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Αφαίρεση":"Προσθήκη",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Προσθήκη",s.buttonText="Προσθήκη",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Αφαίρεση",s.buttonText="Αφαίρεση",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ρυθμίσεις":o="settings";break;case"Πρόσθετα":o="plugins";break;case"Θέματα":o="themes";break;case"Αποσπάσματα":o="snippets";break;case"Αρχείο κταγραφής αλλαγών":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ρυθμίσεις"),t?void 0:o("Πρόσθετα"),t?void 0:o("Θέματα"),o("Αρχείο κταγραφής αλλαγών")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Δομοστοιχεία GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Δομοστοιχεία GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Πρόσθετα"===e[1]||"Θέματα"===e[1]||"Αποσπάσματα"===e[1])||!t.snippets&&"Αποσπάσματα"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ρυθμίσεις":o="settings";break;case"Πρόσθετα":o="plugins";break;case"Θέματα":o="themes";break;case"Αποσπάσματα":o="snippets";break;case"Αρχείο κταγραφής αλλαγών":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Πρόσθετα"!==t[1]&&"Θέματα"!==t[1]&&"Αποσπάσματα"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Πρόσθετα"!==e.target.textContent&&"Θέματα"!==e.target.textContent&&"Αποσπάσματα"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Αρχείο κταγραφής αλλαγών",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Δομοστοιχεία GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Ρυθμίσεις",["",{type:"header",text:"Ρυθμίσεις"},{type:"toggle",text:"GooseMod Ιστορικό Αλλαγών",subtext:"Εμφάνιση ρύθμισης GooseMod\"Ιστορικό Αλλαγών\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Βασικοί Διαχωριστές",subtext:"Εμφάνιση διαχωριστών μεταξύ βασικών GooseMod ρυθμίσεων",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Κατάστημα Στην Αρχική",subtext:"Τοποθέτησε τις GooseMod Store ρυθμίσεις στην αρχική αντί στις ρυθμίσεις",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Κατάστημα"},{type:"toggle",text:"Αυτόματη Ενημέρωση",subtext:"Αυτόματη ενημέρωση βιβλιοθηκών και δομοστοιχείων κάθε ωρα",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Εμφάνιση"},{type:"toggle",text:"GooseMod Εμβλήματα",subtext:"Εμφάνιση GooseMod εμβλημάτων",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Χρήσιμα πράγματα"},{type:"text-and-button",text:"Καθαρισμός μνήμης Cache",subtext:"Καθαρίζει(πλήρως αφαιρεί) τα περισσότερα cache που χρησιμοποιεί το GooseMod",buttonText:"Καθαρισμός",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Αρχή Περιήγησης",subtext:"Ολοκλήρωσε την αρχικη περιήγηση του GooseMod ξανά",buttonText:"Περιήγηση",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Αντιγραφή Debug πληροφοριών",subtext:"Αντιγράφει πληροφορίες που αφορούν την εγκατάσταση και το GooseMod με σκοπό την αναφορά και τον εντοπισμό σφαλμάτων",buttonText:"Αντιγραφή",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Επαναφορά GooseMod",subtext:"Πλήρης επαναφορά GooseMod: αφαιρεί όλες τις προτιμήσεις και βιβλιοθήκες; σαν μια αρχική εγκατάσταση",buttonText:"Επαναφορά",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Αντίγραφο ασφαλείας"},{type:"text-and-button",text:"Δημιουργία Αντιγράφου",subtext:"Δημιουργεί ένα αρχείο ως αντίγραφο ασφαλείας των GooseMod δομοστοιχείων και ρυθμίσεων σας",buttonText:"Αντίγραφο ασφαλείας",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Επαναφορά αντιγράφου ασφαλείας",subtext:"Επαναφέρετε τα GooseMod δομοστοιχεία και ρυθμίσεις μέσω ενός αντιγράφου ασφαλείας, **Επαναφέρετε μονο αντίγραφα που εμπιστέυεστε**",buttonText:"Επαναφορά",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Μικροδιορθώσεις",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Μικρότερες αλλαγές όπως μικρές αλλαγές στο UI για να φέρει το GooseMod στα μέτρα σας"},{type:"toggle",text:"Εικόνα συμβόλου υποκατάστασης",subtext:"Χρήση εικόνας συμβόλου υποκατάστασης στο κατάστημα για δομοστοιχεία δίχως εικόνα",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Πτυσσόμενη Αρχική Κατηγορία",subtext:"Επέτρεψε την αρχική κατηγορία να είναι πτυσσόμενη μέσω εικονιδίου",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Πειραματικό",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Οι πειραματικές ρυθμίσεις είναι πιθανά μη-ολοκληρωμένες και ασταθείς, κάτι που μπορεί να οδηγήσει σε μειωμένη εμπειρία"},{type:"toggle",experimental:!0,text:"Χαρακτηριστικά δεδομένων",subtext:"Προσθήκη χαρακτηριστκών δεδομένων σε κάποια στοιχεία για χρήση απο κάποια θέματα",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Αποσπάσματα",subtext:"Ενεργοποίηση καρτέλας αποσπασμάτων στο κατάστημα",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Αναγκασμός Ρυθμίσεων Θέματος",subtext:"Αναγκασμός αυτόματης δημιουργίας ρυθμίσεων για όλα τα θέματα",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Αστέρια",i="Όλα",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Κατάστημα":"Εγκατεστημένα";switch(r){case"Α-Ζ":t.style.order="";break;case"Τελευταία ενημερωμένα":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Αστέρια":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Κατάστημα"!==n&&n!==p||"Όλα"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Κατάστημα";"Κατάστημα"!==n&&"Εγκατεστημένα"!==n&&(n="Κατάστημα"),o.forEach(t);const a=""===d&&"Κατάστημα"===n&&"Όλα"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Δεν βρέθηκαν αποτελέσματα"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα",""!==d&&"Κατάστημα"===n&&"Όλα"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα, μήπως εννοείτε πρόσθετα;",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα, μήπως εννοείτε θέματα;",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Όλα τα θέματα"!==c.textContent&&"Όλα τα πρόσθετα"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Πρόσθετα","Θέματα"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Αναζήτηση Προσθέτων":"Αναζήτηση θεμάτων",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ταξινόμηση κατά",options:["Αστέρια","Α-Ζ","Τελευταία ενημερωμένα"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Δημιουργός",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Όλα"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Υψηλά βαθμολογημένα",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Πρόσφατα ενημερωμένα",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Όλα τα πρόσθετα":"Όλα τα θέματα"},{type:"gm-footer"}]))),e.settings.createItem("Αποσπάσματα",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Αρχείο κταγραφής αλλαγών",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Δομοστοιχεία GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Πρόσθετα"===e||"Θέματα"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Θέματα":"Πρόσθετα",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Κατάστημα GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Κατάστημα GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Κατάστημα GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Κατάστημα GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Αφαίρεση",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Εγκατάσταση",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Πρόσθετα"===e[1]||"Θέματα"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Αφαίρεση":"Εγκατάσταση",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Σπόνσορες","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Μεταφραστής","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Προγραμματιστής","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Επίσημο Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Αφαίρεση"===this.props.buttonText?"Εγκατάσταση":"Αφαίρεση",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Θέματα"===e[1]))[2],d=goosemod.settings.items.find((e=>"Πρόσθετα"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Δομοστοιχεία GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Αφαίρεση"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Επαληθευμένα",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Μη έμπιστο",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Χωρίς PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Αποθετήρια"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Μη έγκυρη βιβλιοθήκη",{type:"error",timeout:5e3,subtext:"Μη έγκυρη μορφή"});if(!confirm("Εξωτερικές βιβλιοθήκες αποτελούν κίνδυνο καθώς δεν ελέγχωνται απο τους προγραμματιστές του GooseMod. Δεν είμαστε υπέυθυνοι για οποιοδήποτε κίνδυνο εξαιτίας εξωτερικών βιβλιοθηκών προστιθεμένων από χρήστες.\n\nΕαν δεν εμπιστέυεσαι τον ιδιοκτήτη αυτής της βιβλιοθήκης, μη τη χρησιμοποιήσεις καθώς θα μπορούσε να θέσει σε κίνδυνο το Discord σου.\n\nΠαρακαλώ επιβεβαίωσε την προσθήκη αυτής της βιβλιοθήκης πατώντας OK."))return void goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Απορρίφθηκε η εντολή ασφαλείας"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Αυτή η βιβλιοθήκη δεν είναι γνωστή ή έμπιστη(Δεν υπάρχει πιστοποίηση PGP), παρακαλώ να είστε έξτρα προσεκτικοί. Βεβαιβωθείτε πως εμπιστέυεσθε τον ιδιοκτήτη(ες) αυτής της βιβλιοθήκης πλήρες.\n\nΓια να λύσετε αυτό το πρόβλημα ζητήστε απο τον διατηρητή της βιβλιοθήκης να προσθέσει PGP πιστοποίηση.\n\nΠαρακαλώ ξαναεπιβεβαιώστε την προσθήκη της βιβλιοθήκης πατώντας OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Απορρίφθηκε η εντολή ασφαλείας"}):goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Αποτυχία μη εμπιστευτού PGP"})}},"Προσθήκη")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Κατάστημα"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Εγκατεστημένα")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Ανανέωση",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Αποθετήρια",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Θέματα",confirmText:"Περιήγηση Θεμάτων",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ομόρφυνε το Discord σου με Θέματα"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Διάλεξε σε περισσότερα απο 100 θέματα να τροποποιήσεις και να βελτιώσεις την διεπαφή χρήστη"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Πρόσθετα",confirmText:"Περιήγηση Προσθέτων",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ενίσχυσε το Discord κάτω από την επιφάνεια"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Τα πρόσθετα αυξάνουν την εμπειρία σας με βελτιώσεις της εφαρμογής"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Κατάστημα",confirmText:"Προβολή καταστήματος στην Αρχική",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Περιήγηση θεμάτων και προσθέτων στο Κατάστημα"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"Το GooseMod χρησιμοποιεί το δικό του Κατάστημα, στο οποίο μπορεί να γίνει εύκολη περιήγηση και εγκατάσταση"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ρυθμίσεις",confirmText:"Δες τις ρυθμίσεις GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ρυθμίσεις-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Πειραματικές Λειτουργίες",description:"Δοκίμασε νέες πειραματικές λειτουργίες"},{name:"Υπηρεσίες",description:"Δημιουργία αντιγράφου ασφαλείας, επαναφορά GooseMod και περισσότερα"},{name:"Μικροδιορθώσεις",description:"Ρύθμισε το GooseMod όπως ακριβώς το θες"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Χρησιμοποίησε τις ρυθμίσεις του GooseMod για να εξατομικεύσεις τα χαρακτηριστικά του"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Υπάρχουν διάφορες επιλογές να αλλάξεις"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Κοινότητα",confirmText:"Γίνε μέλος του GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Κάντε Ερωτήσεις",description:"Κάντε οποιαδήποτε ερώτηση και λάβετε υποστήριξη"},{name:"Νέα",description:"Λάβε τα τελευταία νέα και ανακοινώσεις γύρω απο το GooseMod και σχετικά πρότζεκτ"},{name:"Συμμετέχετε",description:"Βοήθα με υποδείξεις, υποστήριξη και περισσότερα"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Γίνε μέλος της κοινότητας GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Γίνε μέλος του Discord για περαιτέρω πληροφορίες και περισσότερα"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Μάθε Περισσότερα",cancelText:"Δεν ενδιαφέρομαι",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Κατάστημα",description:"Μάθε για το GooseMod και τα περιεχόμενα του"},{name:"Ρυθμίσεις",description:"Μάθε για τις ρυθμίσεις του GooseMod και τα πρόσθετα"},{name:"Κοινότητα",description:"Γίνε μέλος στο Discord μας για να κάνεις ερωτήσεις, επικοδομητική κριτική, να μείνεις ενημερωμένος με τα νεα και πολλα περισσότερα"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Μάθε για το GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ολοκλήρωσε μια σύντομη περιήγηση σχετικά με τις βασικές λειτουργίες του GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Πρόσθετα"===e[1])),themes:e.settings.items.find((e=>"Θέματα"===e[1])),snippets:e.settings.items.find((e=>"Αποσπάσματα"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Θέματα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Θέματα","themes"),id:"gm-home-themes",text:"Θέματα",selected:!1})),c(t.createElement(a,{style:{display:S||"Πρόσθετα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Πρόσθετα","plugins"),id:"gm-home-plugins",text:"Πρόσθετα",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Αποσπάσματα"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Αποσπάσματα","snippets"),id:"gm-home-snippets",text:"Αποσπάσματα",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Αποσπάσματα"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Αφαίρεση":"Προσθήκη",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Προσθήκη",s.buttonText="Προσθήκη",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Αφαίρεση",s.buttonText="Αφαίρεση",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ρυθμίσεις":o="settings";break;case"Πρόσθετα":o="plugins";break;case"Θέματα":o="themes";break;case"Αποσπάσματα":o="snippets";break;case"Αρχείο κταγραφής αλλαγών":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ρυθμίσεις"),t?void 0:o("Πρόσθετα"),t?void 0:o("Θέματα"),o("Αρχείο κταγραφής αλλαγών")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Δομοστοιχεία GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Δομοστοιχεία GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Πρόσθετα"===e[1]||"Θέματα"===e[1]||"Αποσπάσματα"===e[1])||!t.snippets&&"Αποσπάσματα"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ρυθμίσεις":o="settings";break;case"Πρόσθετα":o="plugins";break;case"Θέματα":o="themes";break;case"Αποσπάσματα":o="snippets";break;case"Αρχείο κταγραφής αλλαγών":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Πρόσθετα"!==t[1]&&"Θέματα"!==t[1]&&"Αποσπάσματα"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Πρόσθετα"!==e.target.textContent&&"Θέματα"!==e.target.textContent&&"Αποσπάσματα"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Αρχείο κταγραφής αλλαγών",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Δομοστοιχεία GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Ρυθμίσεις",["",{type:"header",text:"Ρυθμίσεις"},{type:"toggle",text:"GooseMod Ιστορικό Αλλαγών",subtext:"Εμφάνιση ρύθμισης GooseMod\"Ιστορικό Αλλαγών\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Βασικοί Διαχωριστές",subtext:"Εμφάνιση διαχωριστών μεταξύ βασικών GooseMod ρυθμίσεων",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Κατάστημα Στην Αρχική",subtext:"Τοποθέτησε τις GooseMod Store ρυθμίσεις στην αρχική αντί στις ρυθμίσεις",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Κατάστημα"},{type:"toggle",text:"Αυτόματη Ενημέρωση",subtext:"Αυτόματη ενημέρωση βιβλιοθηκών και δομοστοιχείων κάθε ωρα",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Εμφάνιση"},{type:"toggle",text:"GooseMod Εμβλήματα",subtext:"Εμφάνιση GooseMod εμβλημάτων",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Χρήσιμα πράγματα"},{type:"text-and-button",text:"Καθαρισμός μνήμης Cache",subtext:"Καθαρίζει(πλήρως αφαιρεί) τα περισσότερα cache που χρησιμοποιεί το GooseMod",buttonText:"Καθαρισμός",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Αρχή Περιήγησης",subtext:"Ολοκλήρωσε την αρχικη περιήγηση του GooseMod ξανά",buttonText:"Περιήγηση",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Αντιγραφή Debug πληροφοριών",subtext:"Αντιγράφει πληροφορίες που αφορούν την εγκατάσταση και το GooseMod με σκοπό την αναφορά και τον εντοπισμό σφαλμάτων",buttonText:"Αντιγραφή",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Επαναφορά GooseMod",subtext:"Πλήρης επαναφορά GooseMod: αφαιρεί όλες τις προτιμήσεις και βιβλιοθήκες; σαν μια αρχική εγκατάσταση",buttonText:"Επαναφορά",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Αντίγραφο ασφαλείας"},{type:"text-and-button",text:"Δημιουργία Αντιγράφου",subtext:"Δημιουργεί ένα αρχείο ως αντίγραφο ασφαλείας των GooseMod δομοστοιχείων και ρυθμίσεων σας",buttonText:"Αντίγραφο ασφαλείας",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Επαναφορά αντιγράφου ασφαλείας",subtext:"Επαναφέρετε τα GooseMod δομοστοιχεία και ρυθμίσεις μέσω ενός αντιγράφου ασφαλείας, **Επαναφέρετε μονο αντίγραφα που εμπιστέυεστε**",buttonText:"Επαναφορά",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Μικροδιορθώσεις",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Μικρότερες αλλαγές όπως μικρές αλλαγές στο UI για να φέρει το GooseMod στα μέτρα σας"},{type:"toggle",text:"Εικόνα συμβόλου υποκατάστασης",subtext:"Χρήση εικόνας συμβόλου υποκατάστασης στο κατάστημα για δομοστοιχεία δίχως εικόνα",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Πτυσσόμενη Αρχική Κατηγορία",subtext:"Επέτρεψε την αρχική κατηγορία να είναι πτυσσόμενη μέσω εικονιδίου",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Πειραματικό",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Οι πειραματικές ρυθμίσεις είναι πιθανά μη-ολοκληρωμένες και ασταθείς, κάτι που μπορεί να οδηγήσει σε μειωμένη εμπειρία"},{type:"toggle",experimental:!0,text:"Χαρακτηριστικά δεδομένων",subtext:"Προσθήκη χαρακτηριστκών δεδομένων σε κάποια στοιχεία για χρήση απο κάποια θέματα",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Αποσπάσματα",subtext:"Ενεργοποίηση καρτέλας αποσπασμάτων στο κατάστημα",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Αναγκασμός Ρυθμίσεων Θέματος",subtext:"Αναγκασμός αυτόματης δημιουργίας ρυθμίσεων για όλα τα θέματα",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Αστέρια",i="Όλα",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Κατάστημα":"Εγκατεστημένα";switch(r){case"Α-Ζ":t.style.order="";break;case"Τελευταία ενημερωμένα":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Αστέρια":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Κατάστημα"!==n&&n!==p||"Όλα"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Κατάστημα";"Κατάστημα"!==n&&"Εγκατεστημένα"!==n&&(n="Κατάστημα"),o.forEach(t);const a=""===d&&"Κατάστημα"===n&&"Όλα"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Δεν βρέθηκαν αποτελέσματα"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα",""!==d&&"Κατάστημα"===n&&"Όλα"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα, μήπως εννοείτε πρόσθετα;",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Δεν βρέθηκαν αποτελέσματα, μήπως εννοείτε θέματα;",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Όλα τα θέματα"!==c.textContent&&"Όλα τα πρόσθετα"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Πρόσθετα","Θέματα"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Αναζήτηση Προσθέτων":"Αναζήτηση θεμάτων",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ταξινόμηση κατά",options:["Αστέρια","Α-Ζ","Τελευταία ενημερωμένα"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Δημιουργός",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Όλα"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Υψηλά βαθμολογημένα",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Πρόσφατα ενημερωμένα",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Όλα τα πρόσθετα":"Όλα τα θέματα"},{type:"gm-footer"}]))),e.settings.createItem("Αποσπάσματα",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Αρχείο κταγραφής αλλαγών",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Δομοστοιχεία GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Πρόσθετα"===e||"Θέματα"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Θέματα":"Πρόσθετα",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Κατάστημα GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Κατάστημα GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Κατάστημα GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Κατάστημα GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Αφαίρεση",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Εγκατάσταση",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Πρόσθετα"===e[1]||"Θέματα"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Αφαίρεση":"Εγκατάσταση",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Σπόνσορες","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Μεταφραστής","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Προγραμματιστής","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Επίσημο Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Αφαίρεση"===this.props.buttonText?"Εγκατάσταση":"Αφαίρεση",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Θέματα"===e[1]))[2],d=goosemod.settings.items.find((e=>"Πρόσθετα"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Δομοστοιχεία GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Αφαίρεση"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Επαληθευμένα",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Μη έμπιστο",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Χωρίς PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Αποθετήρια"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Μη έγκυρη βιβλιοθήκη",{type:"error",timeout:5e3,subtext:"Μη έγκυρη μορφή"});if(!confirm("Εξωτερικές βιβλιοθήκες αποτελούν κίνδυνο καθώς δεν ελέγχωνται απο τους προγραμματιστές του GooseMod. Δεν είμαστε υπέυθυνοι για οποιοδήποτε κίνδυνο εξαιτίας εξωτερικών βιβλιοθηκών προστιθεμένων από χρήστες.\n\nΕαν δεν εμπιστέυεσαι τον ιδιοκτήτη αυτής της βιβλιοθήκης, μη τη χρησιμοποιήσεις καθώς θα μπορούσε να θέσει σε κίνδυνο το Discord σου.\n\nΠαρακαλώ επιβεβαίωσε την προσθήκη αυτής της βιβλιοθήκης πατώντας OK."))return void goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Απορρίφθηκε η εντολή ασφαλείας"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Αυτή η βιβλιοθήκη δεν είναι γνωστή ή έμπιστη(Δεν υπάρχει πιστοποίηση PGP), παρακαλώ να είστε έξτρα προσεκτικοί. Βεβαιβωθείτε πως εμπιστέυεσθε τον ιδιοκτήτη(ες) αυτής της βιβλιοθήκης πλήρες.\n\nΓια να λύσετε αυτό το πρόβλημα ζητήστε απο τον διατηρητή της βιβλιοθήκης να προσθέσει PGP πιστοποίηση.\n\nΠαρακαλώ ξαναεπιβεβαιώστε την προσθήκη της βιβλιοθήκης πατώντας OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Απορρίφθηκε η εντολή ασφαλείας"}):goosemod.showToast("Ακύρωση προσθήκης βιβλιοθήκης",{type:"danger",timeout:5e3,subtext:"Αποτυχία μη εμπιστευτού PGP"})}},"Προσθήκη")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Κατάστημα"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Εγκατεστημένα")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Ανανέωση",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Αποθετήρια",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.en-GB.js b/goosemod.en-GB.js index e608439d..498dadd9 100644 --- a/goosemod.en-GB.js +++ b/goosemod.en-GB.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Store",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Settings",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Settings-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Store",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Settings",description:"Find out about the settings for GooseMod and plugins"},{name:"Community",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remove":"Add",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Add",s.buttonText="Add",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remove",s.buttonText="Remove",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Settings"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Change Log")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Change Log",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Settings",["",{type:"header",text:"Settings"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Store"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stars",i="All",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Last Updated":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stars":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"All"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"All"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No results found"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No results found",""!==d&&"Store"===n&&"All"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"All Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Search Plugins":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sort by",options:["Stars","A-Z","Last Updated"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Author",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("All"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recently Updated",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"All Plugins":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Change Log",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remove",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Install",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remove":"Install",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remove"===this.props.buttonText?"Install":"Remove",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remove"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="No PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Add")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Refresh",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Store",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Settings",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Settings-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Store",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Settings",description:"Find out about the settings for GooseMod and plugins"},{name:"Community",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remove":"Add",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Add",s.buttonText="Add",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remove",s.buttonText="Remove",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Settings"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Change Log")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Change Log",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Settings",["",{type:"header",text:"Settings"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Store"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stars",i="All",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Last Updated":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stars":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"All"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"All"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No results found"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No results found",""!==d&&"Store"===n&&"All"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"All Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Search Plugins":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sort by",options:["Stars","A-Z","Last Updated"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Author",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("All"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recently Updated",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"All Plugins":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Change Log",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remove",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Install",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remove":"Install",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remove"===this.props.buttonText?"Install":"Remove",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remove"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="No PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Add")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Refresh",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.en-US.js b/goosemod.en-US.js index e608439d..498dadd9 100644 --- a/goosemod.en-US.js +++ b/goosemod.en-US.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Store",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Settings",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Settings-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Store",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Settings",description:"Find out about the settings for GooseMod and plugins"},{name:"Community",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remove":"Add",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Add",s.buttonText="Add",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remove",s.buttonText="Remove",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Settings"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Change Log")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Change Log",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Settings",["",{type:"header",text:"Settings"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Store"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stars",i="All",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Last Updated":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stars":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"All"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"All"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No results found"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No results found",""!==d&&"Store"===n&&"All"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"All Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Search Plugins":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sort by",options:["Stars","A-Z","Last Updated"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Author",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("All"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recently Updated",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"All Plugins":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Change Log",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remove",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Install",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remove":"Install",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remove"===this.props.buttonText?"Install":"Remove",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remove"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="No PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Add")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Refresh",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themes",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Store",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Settings",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Settings-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Store",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Settings",description:"Find out about the settings for GooseMod and plugins"},{name:"Community",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themes"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themes","themes"),id:"gm-home-themes",text:"Themes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remove":"Add",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Add",s.buttonText="Add",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remove",s.buttonText="Remove",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Settings"),t?void 0:o("Plugins"),t?void 0:o("Themes"),o("Change Log")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themes"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Settings":o="settings";break;case"Plugins":o="plugins";break;case"Themes":o="themes";break;case"Snippets":o="snippets";break;case"Change Log":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themes"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themes"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Change Log",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Settings",["",{type:"header",text:"Settings"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Store"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stars",i="All",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Last Updated":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stars":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"All"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"All"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No results found"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No results found",""!==d&&"Store"===n&&"All"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"All Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Search Plugins":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sort by",options:["Stars","A-Z","Last Updated"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Author",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("All"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recently Updated",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"All Plugins":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Change Log",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themes":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Store"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Store"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Store"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remove",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Install",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remove":"Install",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remove"===this.props.buttonText?"Install":"Remove",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remove"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="No PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Add")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Refresh",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.es-ES.js b/goosemod.es-ES.js index 809c5319..9fa68208 100644 --- a/goosemod.es-ES.js +++ b/goosemod.es-ES.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Ver Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embellece tu Discord con Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Elije de entre 100 Temas para ajustar y mejorar tu interfaz de usuario"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Explorar Complementos",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifica tu Discord a otro nivel"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Los complementos aumentan tu experiencia con mejoras en la misma aplicación"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Tienda",confirmText:"Ver Tienda en Inicio",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Explorar Temas y Complementos en la Tienda"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa su propia Tienda, donde facilmente puedes mirar e instalar cosas"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ajustes",confirmText:"Ver Ajustes de GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ajustes-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Caracteristicas Experimentales",description:"Prueba nuevas caracteristicas experimentales"},{name:"Utilidades",description:"Hace copias de seguridad, reestablece GooseMod, y demás"},{name:"Ajustes",description:"Ajusta GooseMod a como lo quieras tú"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Usa los ajustes de GooseMod para personalizar sus funcionalidades"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Hay muchas opciones que puedes cambiar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidad",confirmText:"Unirse al Discord de GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Hace preguntas",description:"Pregunta cualquier cosa y obten soporte"},{name:"Noticias",description:"Enterate de los ultimos anuncios y noticias sobre GooseMod y otros proyectos relacionados"},{name:"Involúcrate",description:"Ayuda con sugerencias, ayudando a otros, y demás"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Unirse a la Comunidad de GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Unete a nuestro Discord para más información"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saber más",cancelText:"No me interesa",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Tienda",description:"Conoce más sobre la tienda de GooseMod y que hay en ella"},{name:"Ajustes",description:"Descubre la configuración de GooseMod y complementos"},{name:"Comunidad",description:"Únete a nuestro Discord para hacer consultas, dar feedback, enterarte de las ultimas noticias, y más"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Conoce más sobre GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ve por un corto tour de las funcionalidades principales de GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Fragmentos"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Fragmentos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Fragmentos","snippets"),id:"gm-home-snippets",text:"Fragmentos",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Fragmentos"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Eliminar":"Añadir",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Añadir",s.buttonText="Añadir",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Eliminar",s.buttonText="Eliminar",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ajustes":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Fragmentos":o="snippets";break;case"Historial de Cambios":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ajustes"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Historial de Cambios")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos de GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos de GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Fragmentos"===e[1])||!t.snippets&&"Fragmentos"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ajustes":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Fragmentos":o="snippets";break;case"Historial de Cambios":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Fragmentos"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Fragmentos"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Historial de Cambios",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos de GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Reiniciar","Actualización requerida","Esta configuración **requiere cerrar y volver a abrir discord para surtir efecto**. Usted **puede experimentar algún comportamiento extraño ** en esta sesión antes de refrescarse.")&&location.reload()};e.settings.createItem("Ajustes",["",{type:"header",text:"Ajustes"},{type:"toggle",text:"Historial de cambios de GooseMod",subtext:"Mostrar el ajuste de GooseMod \"Historial de cambios\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principales",subtext:"Mostrar separadores entre los ajustes principales de GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Tienda en Inicio",subtext:"Poner las opciones de Tienda de GooseMod en inicio en vez de en ajustes",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Tienda"},{type:"toggle",text:"Actualización Automática",subtext:"Actualizar automaticamente repositorios y módulos cada hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Nuevo modulo de notificaciones",subtext:"Muestra una notificación cada vez que se agrega un nuevo módulo a la Tienda",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Apariencia"},{type:"toggle",text:"Insignias de GooseMod",subtext:"Mostrar las insignias de GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Purgar Cachés",subtext:"Purga (borra completamente) la mayoría de cachés que usa GooseMod",buttonText:"Purgar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Empezar Tour",subtext:"Ir por el tutorial inicial de GooseMod otra vez",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar información de depuración",subtext:"Copia la información de instalacion y de GooseMod para reportar y depurar",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Restablecer GooseMod",subtext:"Reestablece completamente GooseMod: elimina todas las preferencias y módulos; como una instalación por primera vez",buttonText:"Reestablecer",onclick:async()=>{await e.confirmDialog("Resetear","Reestablecer GooseMod","La confirmación restablecerá completamente GooseMod, eliminando todas las preferencias y módulos; como si hubieras instalado GooseMod por primera vez. Esto es irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Copia de seguridad"},{type:"text-and-button",text:"Crear Copia de seguridad",subtext:"Crea un archivo de copia de seguridad de tus preferencias y módulos de GooseMod",buttonText:"Confirmar",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Reestablecer Copia de seguridad",subtext:"Reestablece tus preferencias y módulos de GooseMod a partir de un archivo de copia de seguridad, **solo reestablece copias en las que confíes**",buttonText:"Reestablecer",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Cambios menores como pequeños cambios en la interfaz de usuario para hacer que GooseMod sea como quieras"},{type:"toggle",text:"Marcador de imagen",subtext:"Utilizar una imagen de marcador de posición en el almacén para módulos sin imágenes",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoría de Inicio Plegable",subtext:"Dejar que la categoría de inicio sea plegable a través del icono",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Los ajustes experimentales probablemente estan incompletos y son inusables, lo que puede resultar en una experiencia reducida"},{type:"toggle",experimental:!0,text:"Atributos de Datos",subtext:"Añade atributos de datos a algunos elementos para que algunos temas los usen",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Fragmentos",subtext:"Habilitar la pestaña Snippets en la Tienda",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forzar Ajustes de Temas",subtext:"Forzar la generación automatica de ajustes para todos los temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrellas",i="Todos",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Tienda":"Instalado";switch(r){case"A-Z":t.style.order="";break;case"Actualizados Recientemente":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrellas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Tienda"!==n&&n!==p||"Todos"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Tienda";"Tienda"!==n&&"Instalado"!==n&&(n="Tienda"),o.forEach(t);const a=""===d&&"Tienda"===n&&"Todos"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No se encontraron resultados"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No se encontraron resultados",""!==d&&"Tienda"===n&&"Todos"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No se han encontrado resultados, ¿quiso decir plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No se han encontrado resultados, ¿quiso decir temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos los Temas"!==c.textContent&&"Todos los Complementos"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Buscar Plugins":"Buscar Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrellas","A-Z","Actualizados Recientemente"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Todos"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Más destacados",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Actualizados Recientemente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos los Complementos":"Todos los Temas"},{type:"gm-footer"}]))),e.settings.createItem("Fragmentos",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Historial de Cambios",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos de GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Tienda de GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Tienda de GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Tienda de GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Tienda de GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Eliminar",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Eliminar":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor de GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traductor de GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desarrollador de GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Eliminar"===this.props.buttonText?"Instalar":"Eliminar",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos de GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Abrir enlace"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Eliminar"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificación PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP no confiable",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Sin PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositorios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositorio Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Los repositorios externos suponen riesgos de seguridad ya que no son controlados por los desarrolladores de GooseMod. No somos responsables de ningún daño que sea causado por repositorios externos añadidos por el usuario.\n\nSi no confías en el propietario de este repositorio, no lo uses ya que podría comprometer tu instalación de Discord.\n\nPor favor confirma el añadir este repositorio clickeando OK."))return void goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Mensaje de seguridad rechazado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Este repositorio no es conocido o confiable (sin verificación PGP), por favor tenga cuidado extra. Asegúrese de que confía completamente en el/los dueño(s) de este repositorio.\n\nPara arreglar este problema contáctese con el mantenedor de este repositorio para que añada soporte de PGP.\n\nPor favor confirme el añadir este repositorio clickeando OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Mensaje de seguridad rechazado"}):goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Confianza PGP fallida"})}},"Añadir")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Tienda"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalado")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Recargar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositorios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Ver Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embellece tu Discord con Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Elije de entre 100 Temas para ajustar y mejorar tu interfaz de usuario"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Explorar Complementos",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifica tu Discord a otro nivel"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Los complementos aumentan tu experiencia con mejoras en la misma aplicación"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Tienda",confirmText:"Ver Tienda en Inicio",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Explorar Temas y Complementos en la Tienda"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa su propia Tienda, donde facilmente puedes mirar e instalar cosas"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ajustes",confirmText:"Ver Ajustes de GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ajustes-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Caracteristicas Experimentales",description:"Prueba nuevas caracteristicas experimentales"},{name:"Utilidades",description:"Hace copias de seguridad, reestablece GooseMod, y demás"},{name:"Ajustes",description:"Ajusta GooseMod a como lo quieras tú"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Usa los ajustes de GooseMod para personalizar sus funcionalidades"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Hay muchas opciones que puedes cambiar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidad",confirmText:"Unirse al Discord de GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Hace preguntas",description:"Pregunta cualquier cosa y obten soporte"},{name:"Noticias",description:"Enterate de los ultimos anuncios y noticias sobre GooseMod y otros proyectos relacionados"},{name:"Involúcrate",description:"Ayuda con sugerencias, ayudando a otros, y demás"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Unirse a la Comunidad de GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Unete a nuestro Discord para más información"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saber más",cancelText:"No me interesa",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Tienda",description:"Conoce más sobre la tienda de GooseMod y que hay en ella"},{name:"Ajustes",description:"Descubre la configuración de GooseMod y complementos"},{name:"Comunidad",description:"Únete a nuestro Discord para hacer consultas, dar feedback, enterarte de las ultimas noticias, y más"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Conoce más sobre GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ve por un corto tour de las funcionalidades principales de GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Fragmentos"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Fragmentos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Fragmentos","snippets"),id:"gm-home-snippets",text:"Fragmentos",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Fragmentos"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Eliminar":"Añadir",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Añadir",s.buttonText="Añadir",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Eliminar",s.buttonText="Eliminar",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ajustes":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Fragmentos":o="snippets";break;case"Historial de Cambios":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ajustes"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Historial de Cambios")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos de GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos de GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Fragmentos"===e[1])||!t.snippets&&"Fragmentos"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ajustes":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Fragmentos":o="snippets";break;case"Historial de Cambios":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Fragmentos"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Fragmentos"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Historial de Cambios",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos de GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Reiniciar","Actualización requerida","Esta configuración **requiere cerrar y volver a abrir discord para surtir efecto**. Usted **puede experimentar algún comportamiento extraño ** en esta sesión antes de refrescarse.")&&location.reload()};e.settings.createItem("Ajustes",["",{type:"header",text:"Ajustes"},{type:"toggle",text:"Historial de cambios de GooseMod",subtext:"Mostrar el ajuste de GooseMod \"Historial de cambios\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principales",subtext:"Mostrar separadores entre los ajustes principales de GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Tienda en Inicio",subtext:"Poner las opciones de Tienda de GooseMod en inicio en vez de en ajustes",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Tienda"},{type:"toggle",text:"Actualización Automática",subtext:"Actualizar automaticamente repositorios y módulos cada hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Nuevo modulo de notificaciones",subtext:"Muestra una notificación cada vez que se agrega un nuevo módulo a la Tienda",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Apariencia"},{type:"toggle",text:"Insignias de GooseMod",subtext:"Mostrar las insignias de GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Purgar Cachés",subtext:"Purga (borra completamente) la mayoría de cachés que usa GooseMod",buttonText:"Purgar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Empezar Tour",subtext:"Ir por el tutorial inicial de GooseMod otra vez",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar información de depuración",subtext:"Copia la información de instalacion y de GooseMod para reportar y depurar",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Restablecer GooseMod",subtext:"Reestablece completamente GooseMod: elimina todas las preferencias y módulos; como una instalación por primera vez",buttonText:"Reestablecer",onclick:async()=>{await e.confirmDialog("Resetear","Reestablecer GooseMod","La confirmación restablecerá completamente GooseMod, eliminando todas las preferencias y módulos; como si hubieras instalado GooseMod por primera vez. Esto es irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Copia de seguridad"},{type:"text-and-button",text:"Crear Copia de seguridad",subtext:"Crea un archivo de copia de seguridad de tus preferencias y módulos de GooseMod",buttonText:"Confirmar",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Reestablecer Copia de seguridad",subtext:"Reestablece tus preferencias y módulos de GooseMod a partir de un archivo de copia de seguridad, **solo reestablece copias en las que confíes**",buttonText:"Reestablecer",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Cambios menores como pequeños cambios en la interfaz de usuario para hacer que GooseMod sea como quieras"},{type:"toggle",text:"Marcador de imagen",subtext:"Utilizar una imagen de marcador de posición en el almacén para módulos sin imágenes",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoría de Inicio Plegable",subtext:"Dejar que la categoría de inicio sea plegable a través del icono",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Los ajustes experimentales probablemente estan incompletos y son inusables, lo que puede resultar en una experiencia reducida"},{type:"toggle",experimental:!0,text:"Atributos de Datos",subtext:"Añade atributos de datos a algunos elementos para que algunos temas los usen",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Fragmentos",subtext:"Habilitar la pestaña Snippets en la Tienda",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forzar Ajustes de Temas",subtext:"Forzar la generación automatica de ajustes para todos los temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrellas",i="Todos",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Tienda":"Instalado";switch(r){case"A-Z":t.style.order="";break;case"Actualizados Recientemente":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrellas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Tienda"!==n&&n!==p||"Todos"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Tienda";"Tienda"!==n&&"Instalado"!==n&&(n="Tienda"),o.forEach(t);const a=""===d&&"Tienda"===n&&"Todos"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"No se encontraron resultados"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="No se encontraron resultados",""!==d&&"Tienda"===n&&"Todos"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No se han encontrado resultados, ¿quiso decir plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No se han encontrado resultados, ¿quiso decir temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos los Temas"!==c.textContent&&"Todos los Complementos"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Buscar Plugins":"Buscar Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrellas","A-Z","Actualizados Recientemente"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Todos"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Más destacados",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Actualizados Recientemente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos los Complementos":"Todos los Temas"},{type:"gm-footer"}]))),e.settings.createItem("Fragmentos",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Historial de Cambios",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos de GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Tienda de GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Tienda de GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Tienda de GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Tienda de GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Eliminar",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Eliminar":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor de GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traductor de GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desarrollador de GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Eliminar"===this.props.buttonText?"Instalar":"Eliminar",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos de GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Abrir enlace"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Eliminar"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificación PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP no confiable",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Sin PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositorios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositorio Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Los repositorios externos suponen riesgos de seguridad ya que no son controlados por los desarrolladores de GooseMod. No somos responsables de ningún daño que sea causado por repositorios externos añadidos por el usuario.\n\nSi no confías en el propietario de este repositorio, no lo uses ya que podría comprometer tu instalación de Discord.\n\nPor favor confirma el añadir este repositorio clickeando OK."))return void goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Mensaje de seguridad rechazado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Este repositorio no es conocido o confiable (sin verificación PGP), por favor tenga cuidado extra. Asegúrese de que confía completamente en el/los dueño(s) de este repositorio.\n\nPara arreglar este problema contáctese con el mantenedor de este repositorio para que añada soporte de PGP.\n\nPor favor confirme el añadir este repositorio clickeando OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Mensaje de seguridad rechazado"}):goosemod.showToast("Cancelado Añadir Repositorio",{type:"danger",timeout:5e3,subtext:"Confianza PGP fallida"})}},"Añadir")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Tienda"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalado")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Recargar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositorios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.fi.js b/goosemod.fi.js index f34b4ee6..484b9fcb 100644 --- a/goosemod.fi.js +++ b/goosemod.fi.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teemat",confirmText:"Selaa teemoja",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Kaunista Discordia teemoilla"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Valitse yli 100 teeman joukosta, joilla voit muokata ja parantaa käyttöliittymääsi"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Laajennukset",confirmText:"Selaa laajennuksia",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Paranna Discordin ominaisuuksia"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Laajennukset parantavat käyttökokemustasi itse sovelluksen parannuksilla"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Kauppa",confirmText:"Näytä Kauppa kotisivulla",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Selaa teemoja ja laajennuksia kaupassa"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod käyttää omaa Kauppaa, jossa voit helposti tutustua teemoihin ja laajennuksiin ja asentaa niitä"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Asetukset",confirmText:"Näytä GooseModin asetukset",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Asetukset-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kokeelliset ominaisuudet",description:"Kokeile uusia kokeellisia ominaisuuksia"},{name:"Apuvälineet",description:"Tee varmuuskopioita, nollaa GooseMod ja paljon muuta"},{name:"Säädöt",description:"Muokkaa GooseMod haluamaksesi"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Käytä GooseModin Asetuksia sen ominaisuuksien mukauttamiseen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Voit muuttaa useita asetuksia"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Yhteisö",confirmText:"Liity GooseMod Discordiin",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kysy kysymyksiä",description:"Kysy kysymyksiä ja saa tukea"},{name:"Uutiset",description:"Saa viimeisimmät uutiset ja ilmoitukset GooseModista ja siihen liittyvistä projekteista"},{name:"Osallistu",description:"Auta ehdotuksilla, muiden tukemisella ja muuten"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Liity GooseModin yhteisöön"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Liity Discordiin saadaksesi lisätietoja paljon muuta"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Lue lisää",cancelText:"En ole kiinnostunut",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kauppa",description:"Opi GooseModin kaupasta ja sen sisällöstä"},{name:"Asetukset",description:"Tutustu GooseModin ja liitännäisten asetuksiin"},{name:"Yhteisö",description:"Liity Discordiin kysyäksesi kysymyksiä, antaaksesi palautetta, pysyäksesi ajan tasalla uutisista ja paljon muuta"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Lisätietoja GooseModista"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Käy läpi lyhyt kierros GooseModin perustoiminnoista"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Laajennukset"===e[1])),themes:e.settings.items.find((e=>"Teemat"===e[1])),snippets:e.settings.items.find((e=>"Koodipätkät"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teemat"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teemat","themes"),id:"gm-home-themes",text:"Teemat",selected:!1})),c(t.createElement(a,{style:{display:S||"Laajennukset"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Laajennukset","plugins"),id:"gm-home-plugins",text:"Laajennukset",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Koodipätkät"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Koodipätkät","snippets"),id:"gm-home-snippets",text:"Koodipätkät",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Koodipätkät"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Poista":"Lisää",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Lisää",s.buttonText="Lisää",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Poista",s.buttonText="Poista",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Asetukset":o="settings";break;case"Laajennukset":o="plugins";break;case"Teemat":o="themes";break;case"Koodipätkät":o="snippets";break;case"Muutosloki":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Asetukset"),t?void 0:o("Laajennukset"),t?void 0:o("Teemat"),o("Muutosloki")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Moduulit",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Moduulit"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Laajennukset"===e[1]||"Teemat"===e[1]||"Koodipätkät"===e[1])||!t.snippets&&"Koodipätkät"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Asetukset":o="settings";break;case"Laajennukset":o="plugins";break;case"Teemat":o="themes";break;case"Koodipätkät":o="snippets";break;case"Muutosloki":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Laajennukset"!==t[1]&&"Teemat"!==t[1]&&"Koodipätkät"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Laajennukset"!==e.target.textContent&&"Teemat"!==e.target.textContent&&"Koodipätkät"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Muutosloki",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Moduulit"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Asetukset",["",{type:"header",text:"Asetukset"},{type:"toggle",text:"GooseMod Muutosloki",subtext:"Näytä GooseMod \"Muutosloki\" -asetus",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Erottimet asetuksissa",subtext:"näytä erottimet asetuksien välissä GooseModin asetuksissa",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Kauppa kotisivulla",subtext:"Näytä GooseMod kaupan asetukset kotisivulla astetusten sijasta",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Kauppa"},{type:"toggle",text:"Automaattiset päivitykset",subtext:"Päivitä repositoriot ja moduulit automaattisesti joka tunti",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Uudet moduuli ilmoitukset",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Ulkonäkö"},{type:"toggle",text:"GooseMod Merkit",subtext:"Näyttää GooseMod merkit",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Apuvälineet"},{type:"text-and-button",text:"Tyhjennä välimuistit",subtext:"Puhdistaa (poistaa kokonaan) lähes kaiken GooseModin käyttämän välimuistin",buttonText:"Tyhjennä",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Aloita Esittely",subtext:"Käy GooseModin esittely uudelleen läpi",buttonText:"Esittely",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopio virheenkorjaustiedot",subtext:"Kopioi tietoja asetuksista ja GooseModista raportointia ja virheenkorjausta varten",buttonText:"Kopioi",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Palauta GooseMod",subtext:"Nollaa GooseModin kokonaan: poistaa kaikki asetukset ja moduulit; kuten ensiasennuksen yhteydessä",buttonText:"Nollaa",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Varmuuskopiointi"},{type:"text-and-button",text:"Luo varmuuskopio",subtext:"Luo tiedoston GooseMod-moduulien ja -asetusten varmuuskopiointia varten",buttonText:"Varmuuskopio",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Palauta varmuuskopiosta",subtext:"Palauta GooseMod-moduulisi ja -asetuksesi varmuuskopiotiedoston avulla, **palauta vain varmuuskopiot, joihin luotat**",buttonText:"Palauta",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Säädöt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Pienet muutokset, kuten pienet käyttöliittymämuuttokset, jotta GooseMod olisi haluamasi kaltainen"},{type:"toggle",text:"Väliaikainen kuva",subtext:"Käytä väliaikaista kuvaa kaupassa moduuleille, joissa ei ole kuvia",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Piilotettava kotikategoria",subtext:"Salli kotikategorian piilottaminen kuvakkeen kautta",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Kokeellinen",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kokeelliset asetukset ovat todennäköisestä keskeneräisiä ja epävakaita, joka vai haitata käyttökokemusta"},{type:"toggle",experimental:!0,text:"Tietomääritteet",subtext:"Lisää tietomääritteitä joihinkin elementteihin, joidenkin teemojen toimivuudin lisäämiseksi",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Koodipätkät",subtext:"Ota Koodipätkät välilehti käyttöön kaupassa",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Pakota teema-asetukset",subtext:"Pakota automaattisesti luodut asetukset kaikille teemoille",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Tähdet",i="Kaikki",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Kauppa":"Asennetut";switch(r){case"A-Z":t.style.order="";break;case"Viimeksi päivitetty":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Tähdet":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Kauppa"!==n&&n!==p||"Kaikki"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Kauppa";"Kauppa"!==n&&"Asennetut"!==n&&(n="Kauppa"),o.forEach(t);const a=""===d&&"Kauppa"===n&&"Kaikki"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ei tuloksia"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ei tuloksia",""!==d&&"Kauppa"===n&&"Kaikki"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ei tuloksia, tarkoititko laajennuksia?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ei tuloksia, tarkoitiko teemoja?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Kaikki teemat"!==c.textContent&&"Kaikki lisäosat"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Laajennukset","Teemat"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hae laajennuksia":"Hae teemoja",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Lajitteluperuste",options:["Tähdet","A-Z","Viimeksi päivitetty"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Tekijä",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Kaikki"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Suosituimmat",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Hiljattain päivitetty",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Kaikki lisäosat":"Kaikki teemat"},{type:"gm-footer"}]))),e.settings.createItem("Koodipätkät",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Muutosloki",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Moduulit"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Laajennukset"===e||"Teemat"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teemat":"Laajennukset",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Kauppa"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Kauppa"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Kauppa"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Kauppa"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Poista",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Asenna",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Laajennukset"===e[1]||"Teemat"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Poista":"Asenna",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsori","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Kääntäjä","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod kehittäjä","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseModin virallinen Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Poista"===this.props.buttonText?"Asenna":"Poista",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teemat"===e[1]))[2],d=goosemod.settings.items.find((e=>"Laajennukset"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Moduulit")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Avaa linkki"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Poista"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP-varmennettu",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP:hen ei luoteta",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ei PGP: tä",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositoriot"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Viallinen repositorio",{type:"error",timeout:5e3,subtext:"Virheellinen muotoilu"});if(!confirm("Ulkoiset repositoriot voivat aiheuttaa turvallisuusriskejä, koska GooseModin kehittäjät eivät hallitse niit. Emme ole vastuussa mistään vaaroista, jotka johtuvat käyttäjien lisäämistä ulkoisista repositoiroista.\n\nJos et luota repositorion omistajaan älä käytä sitä, koska se voisi vaarantaa Discord-asennuksesi.\n\nVarmista repositorion lisääminen painamalla OK."))return void goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"Hylätty turvallisuuskehote"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tämä repositorio ei ole tunnettu tai luotettu (ei PGP-varmennetta), ole erityisen varovainen. Varmista, että luotat täysin tämän repositorion omistajaan (omistajiin).\n\nTämän ongelman ratkaisemiseksi pyydä repositorion ylläpitäjää lisäämään PGP-tuki.\n\nVahvista uudelleen tämän repositorion lisääminen painamalla OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"Hylätty turvallisuuskehote"}):goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"PGP-virhe"})}},"Lisää")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Kauppa"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Asennetut")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Lataa uudelleen",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositoriot",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teemat",confirmText:"Selaa teemoja",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Kaunista Discordia teemoilla"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Valitse yli 100 teeman joukosta, joilla voit muokata ja parantaa käyttöliittymääsi"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Laajennukset",confirmText:"Selaa laajennuksia",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Paranna Discordin ominaisuuksia"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Laajennukset parantavat käyttökokemustasi itse sovelluksen parannuksilla"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Kauppa",confirmText:"Näytä Kauppa kotisivulla",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Selaa teemoja ja laajennuksia kaupassa"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod käyttää omaa Kauppaa, jossa voit helposti tutustua teemoihin ja laajennuksiin ja asentaa niitä"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Asetukset",confirmText:"Näytä GooseModin asetukset",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Asetukset-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kokeelliset ominaisuudet",description:"Kokeile uusia kokeellisia ominaisuuksia"},{name:"Apuvälineet",description:"Tee varmuuskopioita, nollaa GooseMod ja paljon muuta"},{name:"Säädöt",description:"Muokkaa GooseMod haluamaksesi"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Käytä GooseModin Asetuksia sen ominaisuuksien mukauttamiseen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Voit muuttaa useita asetuksia"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Yhteisö",confirmText:"Liity GooseMod Discordiin",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kysy kysymyksiä",description:"Kysy kysymyksiä ja saa tukea"},{name:"Uutiset",description:"Saa viimeisimmät uutiset ja ilmoitukset GooseModista ja siihen liittyvistä projekteista"},{name:"Osallistu",description:"Auta ehdotuksilla, muiden tukemisella ja muuten"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Liity GooseModin yhteisöön"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Liity Discordiin saadaksesi lisätietoja paljon muuta"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Lue lisää",cancelText:"En ole kiinnostunut",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kauppa",description:"Opi GooseModin kaupasta ja sen sisällöstä"},{name:"Asetukset",description:"Tutustu GooseModin ja liitännäisten asetuksiin"},{name:"Yhteisö",description:"Liity Discordiin kysyäksesi kysymyksiä, antaaksesi palautetta, pysyäksesi ajan tasalla uutisista ja paljon muuta"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Lisätietoja GooseModista"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Käy läpi lyhyt kierros GooseModin perustoiminnoista"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Laajennukset"===e[1])),themes:e.settings.items.find((e=>"Teemat"===e[1])),snippets:e.settings.items.find((e=>"Koodipätkät"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teemat"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teemat","themes"),id:"gm-home-themes",text:"Teemat",selected:!1})),c(t.createElement(a,{style:{display:S||"Laajennukset"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Laajennukset","plugins"),id:"gm-home-plugins",text:"Laajennukset",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Koodipätkät"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Koodipätkät","snippets"),id:"gm-home-snippets",text:"Koodipätkät",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Koodipätkät"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Poista":"Lisää",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Lisää",s.buttonText="Lisää",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Poista",s.buttonText="Poista",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Asetukset":o="settings";break;case"Laajennukset":o="plugins";break;case"Teemat":o="themes";break;case"Koodipätkät":o="snippets";break;case"Muutosloki":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Asetukset"),t?void 0:o("Laajennukset"),t?void 0:o("Teemat"),o("Muutosloki")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Moduulit",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Moduulit"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Laajennukset"===e[1]||"Teemat"===e[1]||"Koodipätkät"===e[1])||!t.snippets&&"Koodipätkät"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Asetukset":o="settings";break;case"Laajennukset":o="plugins";break;case"Teemat":o="themes";break;case"Koodipätkät":o="snippets";break;case"Muutosloki":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Laajennukset"!==t[1]&&"Teemat"!==t[1]&&"Koodipätkät"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Laajennukset"!==e.target.textContent&&"Teemat"!==e.target.textContent&&"Koodipätkät"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Muutosloki",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Moduulit"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Asetukset",["",{type:"header",text:"Asetukset"},{type:"toggle",text:"GooseMod Muutosloki",subtext:"Näytä GooseMod \"Muutosloki\" -asetus",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Erottimet asetuksissa",subtext:"näytä erottimet asetuksien välissä GooseModin asetuksissa",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Kauppa kotisivulla",subtext:"Näytä GooseMod kaupan asetukset kotisivulla astetusten sijasta",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Kauppa"},{type:"toggle",text:"Automaattiset päivitykset",subtext:"Päivitä repositoriot ja moduulit automaattisesti joka tunti",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Uudet moduuli ilmoitukset",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Ulkonäkö"},{type:"toggle",text:"GooseMod Merkit",subtext:"Näyttää GooseMod merkit",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Apuvälineet"},{type:"text-and-button",text:"Tyhjennä välimuistit",subtext:"Puhdistaa (poistaa kokonaan) lähes kaiken GooseModin käyttämän välimuistin",buttonText:"Tyhjennä",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Aloita Esittely",subtext:"Käy GooseModin esittely uudelleen läpi",buttonText:"Esittely",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopio virheenkorjaustiedot",subtext:"Kopioi tietoja asetuksista ja GooseModista raportointia ja virheenkorjausta varten",buttonText:"Kopioi",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Palauta GooseMod",subtext:"Nollaa GooseModin kokonaan: poistaa kaikki asetukset ja moduulit; kuten ensiasennuksen yhteydessä",buttonText:"Nollaa",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Varmuuskopiointi"},{type:"text-and-button",text:"Luo varmuuskopio",subtext:"Luo tiedoston GooseMod-moduulien ja -asetusten varmuuskopiointia varten",buttonText:"Varmuuskopio",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Palauta varmuuskopiosta",subtext:"Palauta GooseMod-moduulisi ja -asetuksesi varmuuskopiotiedoston avulla, **palauta vain varmuuskopiot, joihin luotat**",buttonText:"Palauta",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Säädöt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Pienet muutokset, kuten pienet käyttöliittymämuuttokset, jotta GooseMod olisi haluamasi kaltainen"},{type:"toggle",text:"Väliaikainen kuva",subtext:"Käytä väliaikaista kuvaa kaupassa moduuleille, joissa ei ole kuvia",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Piilotettava kotikategoria",subtext:"Salli kotikategorian piilottaminen kuvakkeen kautta",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Kokeellinen",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kokeelliset asetukset ovat todennäköisestä keskeneräisiä ja epävakaita, joka vai haitata käyttökokemusta"},{type:"toggle",experimental:!0,text:"Tietomääritteet",subtext:"Lisää tietomääritteitä joihinkin elementteihin, joidenkin teemojen toimivuudin lisäämiseksi",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Koodipätkät",subtext:"Ota Koodipätkät välilehti käyttöön kaupassa",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Pakota teema-asetukset",subtext:"Pakota automaattisesti luodut asetukset kaikille teemoille",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Tähdet",i="Kaikki",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Kauppa":"Asennetut";switch(r){case"A-Z":t.style.order="";break;case"Viimeksi päivitetty":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Tähdet":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Kauppa"!==n&&n!==p||"Kaikki"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Kauppa";"Kauppa"!==n&&"Asennetut"!==n&&(n="Kauppa"),o.forEach(t);const a=""===d&&"Kauppa"===n&&"Kaikki"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ei tuloksia"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ei tuloksia",""!==d&&"Kauppa"===n&&"Kaikki"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ei tuloksia, tarkoititko laajennuksia?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ei tuloksia, tarkoitiko teemoja?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Kaikki teemat"!==c.textContent&&"Kaikki lisäosat"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Laajennukset","Teemat"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hae laajennuksia":"Hae teemoja",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Lajitteluperuste",options:["Tähdet","A-Z","Viimeksi päivitetty"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Tekijä",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Kaikki"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Suosituimmat",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Hiljattain päivitetty",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Kaikki lisäosat":"Kaikki teemat"},{type:"gm-footer"}]))),e.settings.createItem("Koodipätkät",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Muutosloki",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Moduulit"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Laajennukset"===e||"Teemat"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teemat":"Laajennukset",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Kauppa"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Kauppa"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Kauppa"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Kauppa"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Poista",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Asenna",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Laajennukset"===e[1]||"Teemat"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Poista":"Asenna",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsori","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Kääntäjä","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod kehittäjä","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseModin virallinen Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Poista"===this.props.buttonText?"Asenna":"Poista",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teemat"===e[1]))[2],d=goosemod.settings.items.find((e=>"Laajennukset"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Moduulit")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Avaa linkki"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Poista"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP-varmennettu",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP:hen ei luoteta",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ei PGP: tä",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositoriot"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Viallinen repositorio",{type:"error",timeout:5e3,subtext:"Virheellinen muotoilu"});if(!confirm("Ulkoiset repositoriot voivat aiheuttaa turvallisuusriskejä, koska GooseModin kehittäjät eivät hallitse niit. Emme ole vastuussa mistään vaaroista, jotka johtuvat käyttäjien lisäämistä ulkoisista repositoiroista.\n\nJos et luota repositorion omistajaan älä käytä sitä, koska se voisi vaarantaa Discord-asennuksesi.\n\nVarmista repositorion lisääminen painamalla OK."))return void goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"Hylätty turvallisuuskehote"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tämä repositorio ei ole tunnettu tai luotettu (ei PGP-varmennetta), ole erityisen varovainen. Varmista, että luotat täysin tämän repositorion omistajaan (omistajiin).\n\nTämän ongelman ratkaisemiseksi pyydä repositorion ylläpitäjää lisäämään PGP-tuki.\n\nVahvista uudelleen tämän repositorion lisääminen painamalla OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"Hylätty turvallisuuskehote"}):goosemod.showToast("Repositorion lisääminen peruttiin",{type:"danger",timeout:5e3,subtext:"PGP-virhe"})}},"Lisää")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Kauppa"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Asennetut")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Lataa uudelleen",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositoriot",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.fr.js b/goosemod.fr.js index d5ca4545..f11ab408 100644 --- a/goosemod.fr.js +++ b/goosemod.fr.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Thèmes",confirmText:"Explorez les thèmes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embellissez votre client Discord avec des thèmes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Choisissez parmi plus de 100 thèmes pour ajuster et améliorer votre interface utilisateur"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plug-ins",confirmText:"Explorez les plug-ins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Améliorez votre client Discord sous le capot"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Les plug-ins améliorent votre expérience avec des améliorations dans l\'application même"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Boutique",confirmText:"Voir la boutique dans l\'accueil",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Explorez les thèmes et plug-ins dans la boutique"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod utilise sa propre boutique, que vous pouvez explorer et où vous pouvez installer des modules"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Paramètres",confirmText:"Voir les paramètres de GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Paramètres-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fonctionnalités expérimentales",description:"Essayez de nouvelles fonctionnalités expérimentales"},{name:"Actions",description:"Sauvegardez votre configuration, remettez GooseMod à zéro et plus"},{name:"Ajustements",description:"Ajustez GooseMod comme vous le souhaitez"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Utilisez les paramètres de GooseMod pour personnaliser ses fonctionnalités"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Il y a divers paramètres que vous pouvez modifier"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Communauté",confirmText:"Rejoignez le serveur Discord de GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Posez des questions",description:"Posez n\'importe quelle question et obtenez de l\'aide"},{name:"Nouveautés",description:"Obtenez les dernières nouveautés et annonces autour de GooseMod et des projets liés"},{name:"Impliquez-vous",description:"Aidez avec des suggestions, en aidant d\'autres personnes et plus"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Rejoignez la communauté de GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Rejoignez notre serveur Discord pour plus d\'informations"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"En savoir plus",cancelText:"Pas intéressé",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Boutique",description:"Découvrez la boutique GooseMod et son contenu"},{name:"Paramètres",description:"Découvrez les paramètres de GooseMod et des plug-ins"},{name:"Communauté",description:"Rejoignez notre serveur Discord pour poser des questions, donner votre avis, rester à jour avec les nouveautés et plus"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Découvrez GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faites le tour des fonctionnalités principales de GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plug-ins"===e[1])),themes:e.settings.items.find((e=>"Thèmes"===e[1])),snippets:e.settings.items.find((e=>"Extraits CSS"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Thèmes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Thèmes","themes"),id:"gm-home-themes",text:"Thèmes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plug-ins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plug-ins","plugins"),id:"gm-home-plugins",text:"Plug-ins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Extraits CSS"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Extraits CSS","snippets"),id:"gm-home-snippets",text:"Extraits CSS",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Extraits CSS"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Retirer":"Ajouter",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Ajouter",s.buttonText="Ajouter",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Retirer",s.buttonText="Retirer",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Paramètres":o="settings";break;case"Plug-ins":o="plugins";break;case"Thèmes":o="themes";break;case"Extraits CSS":o="snippets";break;case"Notes de mise à jour":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Paramètres"),t?void 0:o("Plug-ins"),t?void 0:o("Thèmes"),o("Notes de mise à jour")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Modules GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Modules GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plug-ins"===e[1]||"Thèmes"===e[1]||"Extraits CSS"===e[1])||!t.snippets&&"Extraits CSS"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Paramètres":o="settings";break;case"Plug-ins":o="plugins";break;case"Thèmes":o="themes";break;case"Extraits CSS":o="snippets";break;case"Notes de mise à jour":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plug-ins"!==t[1]&&"Thèmes"!==t[1]&&"Extraits CSS"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plug-ins"!==e.target.textContent&&"Thèmes"!==e.target.textContent&&"Extraits CSS"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Notes de mise à jour",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Modules GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Rafraîchir","Rafraîchissement requis","Ce paramètre **requiert un rafraîchissement pour prendre effet**. Vous **risquez de rencontrez des comportements imprévus** lors de cette session avant de rafraîchir.")&&location.reload()};e.settings.createItem("Paramètres",["",{type:"header",text:"Paramètres"},{type:"toggle",text:"Notes de mise à jour de GooseMod",subtext:"Afficher l\'entrée \"Notes de mise à jour\" de GooseMod dans les paramètres",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Séparateurs principaux",subtext:"Afficher des séparateurs entre les principales entrées de paramètres de GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Boutique à l\'accueil",subtext:"Placer les options de boutique de GooseMod dans l\'accueil au lieu de les mettre dans les paramètres",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Boutique"},{type:"toggle",text:"Mise à jour automatique",subtext:"Mettre à jour les dépôts et modules automatiquement toutes les heures",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notification de nouveau module",subtext:"Affiche une notification à chaque fois qu\'un module est ajouté à la boutique",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Apparence"},{type:"toggle",text:"Badges de GooseMod",subtext:"Afficher les badges de GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Actions"},{type:"text-and-button",text:"Vider les caches",subtext:"Vide complètement la plupart des caches utilisés par GooseMod",buttonText:"Vider",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Démarrer la visite guidée",subtext:"Redémarre la visite guidée de GooseMod",buttonText:"Visiter",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copier les informations de débogage",subtext:"Copie des informations sur l\'installation et GooseMod pour rapports et débogage",buttonText:"Copier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Remettre GooseMod à zéro",subtext:"Remet GooseMod à zéro complètement : efface tous les paramètres et modules, comme une première installation",buttonText:"Remettre à zéro",onclick:async()=>{await e.confirmDialog("Remettre à zéro","Remettre GooseMod à zéro","Confirmer remettra GooseMod à zéro, retirant toutes les informations de configurations et modules, comme si vous veniez d\'installer GooseMod pour la première fois. Cette action est irréversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sauvegarde"},{type:"text-and-button",text:"Créer une sauvegarde",subtext:"Crée un fichier de sauvegarde des paramètres et modules de GooseMod",buttonText:"Sauvegarder",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurer une sauvegarde",subtext:"Restaure un fichier de sauvegarde de paramètres et modules de GooseMod, **n\'appliquez que des sauvegardes auxquelles vous faites confiance**",buttonText:"Restaurer",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustements",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Ajustements mineurs tels que de petits changements d\'interface pour rendre GooseMod tel que vous le souhaitez"},{type:"toggle",text:"Image de substitution",subtext:"Utiliser une image de substitution dans la boutique de modules pour ceux sans images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Catégorie pliable dans l\'accueil",subtext:"Possibilité de plier la catégorie GooseMod dans l\'accueil",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Expérimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Les paramètres expérimentaux sont probablement incomplets et instables, ce qui peut nuire à votre expérience"},{type:"toggle",experimental:!0,text:"Attributs de données",subtext:"Ajoute des attributs de données à certains éléments pour permettre leur utilisation par des thèmes",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Extraits CSS",subtext:"Activer l\'onglet Extraits CSS de la boutique",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forcer les paramètres de thèmes",subtext:"Force la génération de paramètres pour tous les thèmes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Étoiles",i="Tous",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Boutique":"Installé(s)";switch(r){case"A-Z":t.style.order="";break;case"Dernière Mise à jour":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Étoiles":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Boutique"!==n&&n!==p||"Tous"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Boutique";"Boutique"!==n&&"Installé(s)"!==n&&(n="Boutique"),o.forEach(t);const a=""===d&&"Boutique"===n&&"Tous"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Aucun résultat"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Aucun résultat",""!==d&&"Boutique"===n&&"Tous"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Aucun résultat trouvé, cherchiez-vous un plug-in ?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Aucun résultat trouvé, cherchiez-vous un thème ?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tous les thèmes"!==c.textContent&&"Tous les plug-ins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plug-ins","Thèmes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Chercher des plug-ins":"Chercher des thèmes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Trier par",options:["Étoiles","A-Z","Dernière Mise à jour"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Auteur",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tous"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Mieux classés",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Récemment mis à jour",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tous les plug-ins":"Tous les thèmes"},{type:"gm-footer"}]))),e.settings.createItem("Extraits CSS",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Notes de mise à jour",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Modules GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plug-ins"===e||"Thèmes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Thèmes":"Plug-ins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Boutique de GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Boutique de GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Boutique de GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Boutique de GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Retirer",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plug-ins"===e[1]||"Thèmes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Retirer":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor de GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traducteur de GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Développeur de GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Serveur Discord officiel de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Retirer"===this.props.buttonText?"Installer":"Retirer",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Thèmes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plug-ins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Modules GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Ouvrir le lien"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Retirer"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Signature PGP vérifiée",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Signature PGP non-fiable",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Pas de signature PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Dépôts"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Dépôt invalide",{type:"error",timeout:5e3,subtext:"Format invalide"});if(!confirm("Les dépôts externes sont source de risques de sécurité car ils ne sont pas contrôlés par les développeurs de GooseMod. Nous ne sommes responsable d\'aucun danger encouru à cause de dépôts externes ajoutés par l\'utilisateur.\n\nSi vous ne faites pas confiance au propriétaire de ce dépôt, ne l\'utilisez pas, il risque de compromettre votre installation Discord.\n\nConfirmez l\'ajout de ce dépôt en cliquant sur OK."))return void goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Refus à l\'invite de sécurité"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ce dépôt n\'est pas connu ou n\'est pas fiable (pas de vérification PGP), faites particulièrement attention. Assurez-vous de faire complètement confiance au(x) propriétaire(s) de ce dépôt.\n\nPour résoudre ce problème, demandez au gérant du dépôt d\'ajouter le support PGP.\n\nVeuillez reconfirmer l\'ajout du dépôt en cliquant sur OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Refus à l\'invite de sécurité"}):goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Échec de la vérification de la signature PGP"})}},"Ajouter")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Boutique"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installé(s)")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Rafraîchir",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Dépôts",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Thèmes",confirmText:"Explorez les thèmes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embellissez votre client Discord avec des thèmes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Choisissez parmi plus de 100 thèmes pour ajuster et améliorer votre interface utilisateur"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plug-ins",confirmText:"Explorez les plug-ins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Améliorez votre client Discord sous le capot"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Les plug-ins améliorent votre expérience avec des améliorations dans l\'application même"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Boutique",confirmText:"Voir la boutique dans l\'accueil",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Explorez les thèmes et plug-ins dans la boutique"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod utilise sa propre boutique, que vous pouvez explorer et où vous pouvez installer des modules"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Paramètres",confirmText:"Voir les paramètres de GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Paramètres-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fonctionnalités expérimentales",description:"Essayez de nouvelles fonctionnalités expérimentales"},{name:"Actions",description:"Sauvegardez votre configuration, remettez GooseMod à zéro et plus"},{name:"Ajustements",description:"Ajustez GooseMod comme vous le souhaitez"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Utilisez les paramètres de GooseMod pour personnaliser ses fonctionnalités"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Il y a divers paramètres que vous pouvez modifier"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Communauté",confirmText:"Rejoignez le serveur Discord de GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Posez des questions",description:"Posez n\'importe quelle question et obtenez de l\'aide"},{name:"Nouveautés",description:"Obtenez les dernières nouveautés et annonces autour de GooseMod et des projets liés"},{name:"Impliquez-vous",description:"Aidez avec des suggestions, en aidant d\'autres personnes et plus"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Rejoignez la communauté de GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Rejoignez notre serveur Discord pour plus d\'informations"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"En savoir plus",cancelText:"Pas intéressé",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Boutique",description:"Découvrez la boutique GooseMod et son contenu"},{name:"Paramètres",description:"Découvrez les paramètres de GooseMod et des plug-ins"},{name:"Communauté",description:"Rejoignez notre serveur Discord pour poser des questions, donner votre avis, rester à jour avec les nouveautés et plus"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Découvrez GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faites le tour des fonctionnalités principales de GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plug-ins"===e[1])),themes:e.settings.items.find((e=>"Thèmes"===e[1])),snippets:e.settings.items.find((e=>"Extraits CSS"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Thèmes"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Thèmes","themes"),id:"gm-home-themes",text:"Thèmes",selected:!1})),c(t.createElement(a,{style:{display:S||"Plug-ins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plug-ins","plugins"),id:"gm-home-plugins",text:"Plug-ins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Extraits CSS"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Extraits CSS","snippets"),id:"gm-home-snippets",text:"Extraits CSS",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Extraits CSS"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Retirer":"Ajouter",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Ajouter",s.buttonText="Ajouter",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Retirer",s.buttonText="Retirer",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Paramètres":o="settings";break;case"Plug-ins":o="plugins";break;case"Thèmes":o="themes";break;case"Extraits CSS":o="snippets";break;case"Notes de mise à jour":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Paramètres"),t?void 0:o("Plug-ins"),t?void 0:o("Thèmes"),o("Notes de mise à jour")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Modules GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Modules GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plug-ins"===e[1]||"Thèmes"===e[1]||"Extraits CSS"===e[1])||!t.snippets&&"Extraits CSS"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Paramètres":o="settings";break;case"Plug-ins":o="plugins";break;case"Thèmes":o="themes";break;case"Extraits CSS":o="snippets";break;case"Notes de mise à jour":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plug-ins"!==t[1]&&"Thèmes"!==t[1]&&"Extraits CSS"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plug-ins"!==e.target.textContent&&"Thèmes"!==e.target.textContent&&"Extraits CSS"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Notes de mise à jour",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Modules GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Rafraîchir","Rafraîchissement requis","Ce paramètre **requiert un rafraîchissement pour prendre effet**. Vous **risquez de rencontrez des comportements imprévus** lors de cette session avant de rafraîchir.")&&location.reload()};e.settings.createItem("Paramètres",["",{type:"header",text:"Paramètres"},{type:"toggle",text:"Notes de mise à jour de GooseMod",subtext:"Afficher l\'entrée \"Notes de mise à jour\" de GooseMod dans les paramètres",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Séparateurs principaux",subtext:"Afficher des séparateurs entre les principales entrées de paramètres de GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Boutique à l\'accueil",subtext:"Placer les options de boutique de GooseMod dans l\'accueil au lieu de les mettre dans les paramètres",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Boutique"},{type:"toggle",text:"Mise à jour automatique",subtext:"Mettre à jour les dépôts et modules automatiquement toutes les heures",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notification de nouveau module",subtext:"Affiche une notification à chaque fois qu\'un module est ajouté à la boutique",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Apparence"},{type:"toggle",text:"Badges de GooseMod",subtext:"Afficher les badges de GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Actions"},{type:"text-and-button",text:"Vider les caches",subtext:"Vide complètement la plupart des caches utilisés par GooseMod",buttonText:"Vider",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Démarrer la visite guidée",subtext:"Redémarre la visite guidée de GooseMod",buttonText:"Visiter",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copier les informations de débogage",subtext:"Copie des informations sur l\'installation et GooseMod pour rapports et débogage",buttonText:"Copier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Remettre GooseMod à zéro",subtext:"Remet GooseMod à zéro complètement : efface tous les paramètres et modules, comme une première installation",buttonText:"Remettre à zéro",onclick:async()=>{await e.confirmDialog("Remettre à zéro","Remettre GooseMod à zéro","Confirmer remettra GooseMod à zéro, retirant toutes les informations de configurations et modules, comme si vous veniez d\'installer GooseMod pour la première fois. Cette action est irréversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sauvegarde"},{type:"text-and-button",text:"Créer une sauvegarde",subtext:"Crée un fichier de sauvegarde des paramètres et modules de GooseMod",buttonText:"Sauvegarder",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurer une sauvegarde",subtext:"Restaure un fichier de sauvegarde de paramètres et modules de GooseMod, **n\'appliquez que des sauvegardes auxquelles vous faites confiance**",buttonText:"Restaurer",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustements",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Ajustements mineurs tels que de petits changements d\'interface pour rendre GooseMod tel que vous le souhaitez"},{type:"toggle",text:"Image de substitution",subtext:"Utiliser une image de substitution dans la boutique de modules pour ceux sans images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Catégorie pliable dans l\'accueil",subtext:"Possibilité de plier la catégorie GooseMod dans l\'accueil",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Expérimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Les paramètres expérimentaux sont probablement incomplets et instables, ce qui peut nuire à votre expérience"},{type:"toggle",experimental:!0,text:"Attributs de données",subtext:"Ajoute des attributs de données à certains éléments pour permettre leur utilisation par des thèmes",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Extraits CSS",subtext:"Activer l\'onglet Extraits CSS de la boutique",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forcer les paramètres de thèmes",subtext:"Force la génération de paramètres pour tous les thèmes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Étoiles",i="Tous",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Boutique":"Installé(s)";switch(r){case"A-Z":t.style.order="";break;case"Dernière Mise à jour":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Étoiles":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Boutique"!==n&&n!==p||"Tous"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Boutique";"Boutique"!==n&&"Installé(s)"!==n&&(n="Boutique"),o.forEach(t);const a=""===d&&"Boutique"===n&&"Tous"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Aucun résultat"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Aucun résultat",""!==d&&"Boutique"===n&&"Tous"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Aucun résultat trouvé, cherchiez-vous un plug-in ?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Aucun résultat trouvé, cherchiez-vous un thème ?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tous les thèmes"!==c.textContent&&"Tous les plug-ins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plug-ins","Thèmes"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Chercher des plug-ins":"Chercher des thèmes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Trier par",options:["Étoiles","A-Z","Dernière Mise à jour"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Auteur",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tous"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Mieux classés",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Récemment mis à jour",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tous les plug-ins":"Tous les thèmes"},{type:"gm-footer"}]))),e.settings.createItem("Extraits CSS",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Notes de mise à jour",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Modules GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plug-ins"===e||"Thèmes"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Thèmes":"Plug-ins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Boutique de GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Boutique de GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Boutique de GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Boutique de GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Retirer",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plug-ins"===e[1]||"Thèmes"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Retirer":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor de GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traducteur de GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Développeur de GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Serveur Discord officiel de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Retirer"===this.props.buttonText?"Installer":"Retirer",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Thèmes"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plug-ins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Modules GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Ouvrir le lien"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Retirer"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Signature PGP vérifiée",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Signature PGP non-fiable",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Pas de signature PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Dépôts"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Dépôt invalide",{type:"error",timeout:5e3,subtext:"Format invalide"});if(!confirm("Les dépôts externes sont source de risques de sécurité car ils ne sont pas contrôlés par les développeurs de GooseMod. Nous ne sommes responsable d\'aucun danger encouru à cause de dépôts externes ajoutés par l\'utilisateur.\n\nSi vous ne faites pas confiance au propriétaire de ce dépôt, ne l\'utilisez pas, il risque de compromettre votre installation Discord.\n\nConfirmez l\'ajout de ce dépôt en cliquant sur OK."))return void goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Refus à l\'invite de sécurité"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ce dépôt n\'est pas connu ou n\'est pas fiable (pas de vérification PGP), faites particulièrement attention. Assurez-vous de faire complètement confiance au(x) propriétaire(s) de ce dépôt.\n\nPour résoudre ce problème, demandez au gérant du dépôt d\'ajouter le support PGP.\n\nVeuillez reconfirmer l\'ajout du dépôt en cliquant sur OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Refus à l\'invite de sécurité"}):goosemod.showToast("Ajout du dépôt annulé",{type:"danger",timeout:5e3,subtext:"Échec de la vérification de la signature PGP"})}},"Ajouter")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Boutique"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installé(s)")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Rafraîchir",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Dépôts",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.hi.js b/goosemod.hi.js index 5cccfac4..9f79e559 100644 --- a/goosemod.hi.js +++ b/goosemod.hi.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"थीमस",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"प्लगइन्स",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"स्टोर",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"सेटिंग्स",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-सेटिंग्स-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"समाज",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"स्टोर",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"सेटिंग्स",description:"Find out about the settings for GooseMod and plugins"},{name:"समाज",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"प्लगइन्स"===e[1])),themes:e.settings.items.find((e=>"थीमस"===e[1])),snippets:e.settings.items.find((e=>"स्निपेट्स"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"थीमस"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("थीमस","themes"),id:"gm-home-themes",text:"थीमस",selected:!1})),c(t.createElement(a,{style:{display:S||"प्लगइन्स"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("प्लगइन्स","plugins"),id:"gm-home-plugins",text:"प्लगइन्स",selected:!1})),k?c(t.createElement(a,{style:{display:S||"स्निपेट्स"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("स्निपेट्स","snippets"),id:"gm-home-snippets",text:"स्निपेट्स",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"स्निपेट्स"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"हटाना":"लगाना",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="लगाना",s.buttonText="लगाना",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="हटाना",s.buttonText="हटाना",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"सेटिंग्स":o="settings";break;case"प्लगइन्स":o="plugins";break;case"थीमस":o="themes";break;case"स्निपेट्स":o="snippets";break;case"चेंजलॉग/नया क्या है":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("सेटिंग्स"),t?void 0:o("प्लगइन्स"),t?void 0:o("थीमस"),o("चेंजलॉग/नया क्या है")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"गूसमॉड मॉड्यूल्स",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"गूसमॉड मॉड्यूल्स"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("प्लगइन्स"===e[1]||"थीमस"===e[1]||"स्निपेट्स"===e[1])||!t.snippets&&"स्निपेट्स"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"सेटिंग्स":o="settings";break;case"प्लगइन्स":o="plugins";break;case"थीमस":o="themes";break;case"स्निपेट्स":o="snippets";break;case"चेंजलॉग/नया क्या है":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"प्लगइन्स"!==t[1]&&"थीमस"!==t[1]&&"स्निपेट्स"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"प्लगइन्स"!==e.target.textContent&&"थीमस"!==e.target.textContent&&"स्निपेट्स"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","चेंजलॉग/नया क्या है",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"गूसमॉड मॉड्यूल्स"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("सेटिंग्स",["",{type:"header",text:"सेटिंग्स"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"स्टोर"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="पसंदीदा",i="सब",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"स्टोर":"इंस्टॉल्ड";switch(r){case"अ-श्र":t.style.order="";break;case"आखरी अपडेट":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"पसंदीदा":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"स्टोर"!==n&&n!==p||"सब"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"स्टोर";"स्टोर"!==n&&"इंस्टॉल्ड"!==n&&(n="स्टोर"),o.forEach(t);const a=""===d&&"स्टोर"===n&&"सब"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"कोई परिणाम नहीं मिला"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="कोई परिणाम नहीं मिला",""!==d&&"स्टोर"===n&&"सब"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="कोई परिणाम नहीं मिला, क्या आपका मतलब प्लगइन्स से था?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="कोई परिणाम नहीं मिला, क्या आपका मतलब थीम से था?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"सारे थीम्स"!==c.textContent&&"सारे प्लगिन्स"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["प्लगइन्स","थीमस"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"प्लगइन्स ढूंढें":"थीम ढूंढें",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"इसके अनुसार क्रमबद्ध करें",options:["पसंदीदा","अ-श्र","आखरी अपडेट"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"लेखक",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("सब"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"सर्वाधिक तारांकित",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"हाल ही में अद्यतित",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"सारे प्लगिन्स":"सारे थीम्स"},{type:"gm-footer"}]))),e.settings.createItem("स्निपेट्स",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("चेंजलॉग/नया क्या है",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("गूसमॉड मॉड्यूल्स"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"प्लगइन्स"===e||"थीमस"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"थीमस":"प्लगइन्स",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"गूसमॉड स्टोर"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"गूसमॉड स्टोर"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"गूसमॉड स्टोर"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"गूसमॉड स्टोर"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="हटाना",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="इंस्टॉल",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"प्लगइन्स"===e[1]||"थीमस"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"हटाना":"इंस्टॉल",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="हटाना"===this.props.buttonText?"इंस्टॉल":"हटाना",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"थीमस"===e[1]))[2],d=goosemod.settings.items.find((e=>"प्लगइन्स"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"गूसमॉड मॉड्यूल्स")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"हटाना"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="पीजीपी सत्यापित",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="पीजीपी अविश्वस्त",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="नो पीजीपी",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"रेपोस"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("बाहरी रिपॉजिटरी सुरक्षा जोखिम पैदा करते हैं क्योंकि वे हमारे डेवलपर्स द्वारा नियंत्रित नहीं होते हैं। हम उनसे होने वाले नुकसान के कारण किसी भी खतरे के लिए जिम्मेदार नहीं हैं।\nअगर आपको इस रिपॉजिटरी के मालिक पर भरोसा नहीं है, तो कृपया इसका इस्तेमाल न करें।\n\nकृपया \"ओके\" दबाकर पुष्टि करें।"))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"लगाना")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"स्टोर"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"इंस्टॉल्ड")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"दोबारा लोड करें",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"रेपोस",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"थीमस",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"प्लगइन्स",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"स्टोर",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"सेटिंग्स",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-सेटिंग्स-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"समाज",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"स्टोर",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"सेटिंग्स",description:"Find out about the settings for GooseMod and plugins"},{name:"समाज",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"प्लगइन्स"===e[1])),themes:e.settings.items.find((e=>"थीमस"===e[1])),snippets:e.settings.items.find((e=>"स्निपेट्स"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"थीमस"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("थीमस","themes"),id:"gm-home-themes",text:"थीमस",selected:!1})),c(t.createElement(a,{style:{display:S||"प्लगइन्स"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("प्लगइन्स","plugins"),id:"gm-home-plugins",text:"प्लगइन्स",selected:!1})),k?c(t.createElement(a,{style:{display:S||"स्निपेट्स"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("स्निपेट्स","snippets"),id:"gm-home-snippets",text:"स्निपेट्स",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"स्निपेट्स"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"हटाना":"लगाना",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="लगाना",s.buttonText="लगाना",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="हटाना",s.buttonText="हटाना",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"सेटिंग्स":o="settings";break;case"प्लगइन्स":o="plugins";break;case"थीमस":o="themes";break;case"स्निपेट्स":o="snippets";break;case"चेंजलॉग/नया क्या है":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("सेटिंग्स"),t?void 0:o("प्लगइन्स"),t?void 0:o("थीमस"),o("चेंजलॉग/नया क्या है")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"गूसमॉड मॉड्यूल्स",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"गूसमॉड मॉड्यूल्स"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("प्लगइन्स"===e[1]||"थीमस"===e[1]||"स्निपेट्स"===e[1])||!t.snippets&&"स्निपेट्स"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"सेटिंग्स":o="settings";break;case"प्लगइन्स":o="plugins";break;case"थीमस":o="themes";break;case"स्निपेट्स":o="snippets";break;case"चेंजलॉग/नया क्या है":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"प्लगइन्स"!==t[1]&&"थीमस"!==t[1]&&"स्निपेट्स"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"प्लगइन्स"!==e.target.textContent&&"थीमस"!==e.target.textContent&&"स्निपेट्स"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","चेंजलॉग/नया क्या है",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"गूसमॉड मॉड्यूल्स"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("सेटिंग्स",["",{type:"header",text:"सेटिंग्स"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"स्टोर"},{type:"toggle",text:"Auto Update",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Appearance"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilities"},{type:"text-and-button",text:"Purge Caches",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="पसंदीदा",i="सब",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"स्टोर":"इंस्टॉल्ड";switch(r){case"अ-श्र":t.style.order="";break;case"आखरी अपडेट":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"पसंदीदा":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"स्टोर"!==n&&n!==p||"सब"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"स्टोर";"स्टोर"!==n&&"इंस्टॉल्ड"!==n&&(n="स्टोर"),o.forEach(t);const a=""===d&&"स्टोर"===n&&"सब"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"कोई परिणाम नहीं मिला"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="कोई परिणाम नहीं मिला",""!==d&&"स्टोर"===n&&"सब"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="कोई परिणाम नहीं मिला, क्या आपका मतलब प्लगइन्स से था?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="कोई परिणाम नहीं मिला, क्या आपका मतलब थीम से था?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"सारे थीम्स"!==c.textContent&&"सारे प्लगिन्स"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["प्लगइन्स","थीमस"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"प्लगइन्स ढूंढें":"थीम ढूंढें",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"इसके अनुसार क्रमबद्ध करें",options:["पसंदीदा","अ-श्र","आखरी अपडेट"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"लेखक",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("सब"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"सर्वाधिक तारांकित",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"हाल ही में अद्यतित",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"सारे प्लगिन्स":"सारे थीम्स"},{type:"gm-footer"}]))),e.settings.createItem("स्निपेट्स",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("चेंजलॉग/नया क्या है",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("गूसमॉड मॉड्यूल्स"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"प्लगइन्स"===e||"थीमस"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"थीमस":"प्लगइन्स",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"गूसमॉड स्टोर"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"गूसमॉड स्टोर"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"गूसमॉड स्टोर"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"गूसमॉड स्टोर"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="हटाना",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="इंस्टॉल",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"प्लगइन्स"===e[1]||"थीमस"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"हटाना":"इंस्टॉल",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="हटाना"===this.props.buttonText?"इंस्टॉल":"हटाना",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"थीमस"===e[1]))[2],d=goosemod.settings.items.find((e=>"प्लगइन्स"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"गूसमॉड मॉड्यूल्स")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"हटाना"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="पीजीपी सत्यापित",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="पीजीपी अविश्वस्त",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="नो पीजीपी",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"रेपोस"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("बाहरी रिपॉजिटरी सुरक्षा जोखिम पैदा करते हैं क्योंकि वे हमारे डेवलपर्स द्वारा नियंत्रित नहीं होते हैं। हम उनसे होने वाले नुकसान के कारण किसी भी खतरे के लिए जिम्मेदार नहीं हैं।\nअगर आपको इस रिपॉजिटरी के मालिक पर भरोसा नहीं है, तो कृपया इसका इस्तेमाल न करें।\n\nकृपया \"ओके\" दबाकर पुष्टि करें।"))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"लगाना")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"स्टोर"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"इंस्टॉल्ड")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"दोबारा लोड करें",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"रेपोस",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.hr.js b/goosemod.hr.js index 6eec63da..282d1476 100644 --- a/goosemod.hr.js +++ b/goosemod.hr.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teme",confirmText:"Pregledaj teme",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Uljepšaj svoj Discord s temama"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Odaberi jednu od preko 100 tema za podešavanje i poboljšanje korisničkog sučelja"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Dodaci",confirmText:"Pregledaj dodatke",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Proširi funkcionalnost Discorda"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Dodaci povećavaju doživljaj poboljšanjima u samom programu"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Trgovina",confirmText:"Pogledaj trgovinu na početnom ekranu",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Pregledaj teme i dodatke u trgovini"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod koristi svoju vlastitu trgovinu za jednostavno pregledavanje i instaliranje"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Postavke",confirmText:"Prikaz GooseMod postavki",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Postavke-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Eksperimentalne funkcije",description:"Isprobaj nove eksperimentalne funkcije"},{name:"Pomoćni programi",description:"Spremaj sigurnosne kopije, obnovi GooseMod i još mnogo toga"},{name:"Podešavanja",description:"Prilagodi GooseMod vlastitim potrebama"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Koristi GooseMod postavke za prilagođavanje njegovih funkcija"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Postoje razne opcije koje možeš promijeniti"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Zajednica",confirmText:"Pridruži se GooseMod Discordu",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Postavljaj pitanja",description:"Postavi bilo kakva pitanja i zatraži podršku"},{name:"Vijesti",description:"Primaj najnovije vijesti i najave o GooseModu i srodnim projektima"},{name:"Uključi se u rad",description:"Pomozi s prijedlozima, pomogni drugima i još mnogo toga"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Pridruži se GooseMod zajednici"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pridruži se našem Discordu za dodatne informacije i više"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saznaj više",cancelText:"Ne zanima",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Trgovina",description:"Saznaj više o GooseMod trgovini i što se u njoj nalazi"},{name:"Postavke",description:"Saznaj više o postavkama za GooseMod i dodatke"},{name:"Zajednica",description:"Pridruži se našem Discordu, postavljaj pitanja, šalji povratne informacije, saznaj novosti i još mnogo toga"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Saznaj o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Prođi kroz kratki obilazak osnovnih funkcija GooseModa"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Dodaci"===e[1])),themes:e.settings.items.find((e=>"Teme"===e[1])),snippets:e.settings.items.find((e=>"Isječci"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teme"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teme","themes"),id:"gm-home-themes",text:"Teme",selected:!1})),c(t.createElement(a,{style:{display:S||"Dodaci"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Dodaci","plugins"),id:"gm-home-plugins",text:"Dodaci",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Isječci"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Isječci","snippets"),id:"gm-home-snippets",text:"Isječci",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Isječci"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Ukloni":"Dodaj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Dodaj",s.buttonText="Dodaj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Ukloni",s.buttonText="Ukloni",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Postavke":o="settings";break;case"Dodaci":o="plugins";break;case"Teme":o="themes";break;case"Isječci":o="snippets";break;case"Dnevnik promjena":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Postavke"),t?void 0:o("Dodaci"),t?void 0:o("Teme"),o("Dnevnik promjena")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduli",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduli"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Dodaci"===e[1]||"Teme"===e[1]||"Isječci"===e[1])||!t.snippets&&"Isječci"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Postavke":o="settings";break;case"Dodaci":o="plugins";break;case"Teme":o="themes";break;case"Isječci":o="snippets";break;case"Dnevnik promjena":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Dodaci"!==t[1]&&"Teme"!==t[1]&&"Isječci"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Dodaci"!==e.target.textContent&&"Teme"!==e.target.textContent&&"Isječci"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Dnevnik promjena",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduli"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Postavke",["",{type:"header",text:"Postavke"},{type:"toggle",text:"Dnevnik promjena GooseModa",subtext:"Prikaži GooseMod postavku „Dnevnik promjena”",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Glavni znakovi razdvajanja",subtext:"Prikaži razdjelnike između glavnih GooseMod postavki",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Trgovina na početnom ekranu",subtext:"Stavi opcije GooseMod trgovine na početni ekran umjesto u postavke",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Trgovina"},{type:"toggle",text:"Automatsko aktualiziranje",subtext:"Automatski aktualiziraj repozitorije i module svakih sat vremena",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Obavijesti za novi modul",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Izgled"},{type:"toggle",text:"GooseMod značke",subtext:"Pokazuje GooseMod značke",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Pomoćni programi"},{type:"text-and-button",text:"Isprazni predmemorije",subtext:"Potpuno uklanja većinu predmemorija koje GooseMod koristi",buttonText:"Isprazni",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Započni obilazak",subtext:"Ponovo prođi kroz GooseModov početni obilazak",buttonText:"Obilazak",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiraj podatke otklanjanja grešaka",subtext:"Kopira informacije o postavi i GooseModu za izvještavanje i otklanjanje grešaka",buttonText:"Kopiraj",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetiraj GooseMod",subtext:"Potpuno resetira GooseMod: uklanja sve postavke i module; kao prva instalacija",buttonText:"Resetiraj",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sigurnosna kopija"},{type:"text-and-button",text:"Stvori sigurnosnu kopiju",subtext:"Stvara datoteku za sigurnosnu kopiju tvojih GooseMod modula i postavki",buttonText:"Sigurnosna kopija",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnovi sigurnosnu kopiju",subtext:"Obnovi svoje GooseMod module i postavke putem sigurnosne kopije, **obnovi samo sigurnosne kopije kojima vjeruješ**",buttonText:"Obnovi",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Podešavanja",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Manje promjene u korisničkom sučelju kako bi GooseMod bio onakav kakvim ga ti želiš imati"},{type:"toggle",text:"Opća slika",subtext:"Koristi opću sliku u trgovini za module bez slika",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sklopiva kategorija početnog ekrana",subtext:"Omogući sklapanje kategorije početnog ekrana putem ikone",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentalno",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentalne postavke vjerojatno su nepotpune i nestabilne, čime smanjuju doživljaj"},{type:"toggle",experimental:!0,text:"Atributi podataka",subtext:"Dodaj atribute podataka nekim elementima za korištenje nekih tema",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Isječci",subtext:"Aktiviraj karticu „Isječci” u trgovini",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Prisili postavke teme",subtext:"Nametni automatski generirane postavke za sve teme",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Zvijezde",i="Sve",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Trgovina":"Instalirano";switch(r){case"A-Z":t.style.order="";break;case"Zadnje aktualizirano":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Zvijezde":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Trgovina"!==n&&n!==p||"Sve"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Trgovina";"Trgovina"!==n&&"Instalirano"!==n&&(n="Trgovina"),o.forEach(t);const a=""===d&&"Trgovina"===n&&"Sve"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nema rezultata"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nema rezultata",""!==d&&"Trgovina"===n&&"Sve"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nisu pronađeni rezultati, možda misliš na dodatke?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nisu pronađeni rezultati, možda misliš na teme?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Sve teme"!==c.textContent&&"Svi dodaci"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Dodaci","Teme"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Traži dodatke":"Traži teme",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Redoslijed",options:["Zvijezde","A-Z","Zadnje aktualizirano"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Sve"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Najivše zvijezda",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nedavno aktualizirano",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Svi dodaci":"Sve teme"},{type:"gm-footer"}]))),e.settings.createItem("Isječci",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Dnevnik promjena",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduli"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Dodaci"===e||"Teme"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teme":"Dodaci",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod trgovina"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod trgovina"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod trgovina"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod trgovina"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Ukloni",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instaliraj",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Dodaci"===e[1]||"Teme"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Ukloni":"Instaliraj",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod sponzor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod prevodilac","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod programer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod službeni Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Ukloni"===this.props.buttonText?"Instaliraj":"Ukloni",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teme"===e[1]))[2],d=goosemod.settings.items.find((e=>"Dodaci"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduli")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otvori poveznicu"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Ukloni"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Provjeren PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Nepovjerljiv PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Bez PGP-a",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitoriji"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neispravan repozitorij",{type:"error",timeout:5e3,subtext:"Neispravan format"});if(!confirm("Vanjski repozitoriji predstavljaju sigurnosne rizike jer ih ne kontroliraju programeri GooseModa. Ne snosimo odgovornost za bilo kakve opasnosti zbog vanjskih repozitorija koje su dodali korisnici.\n\nAko ne vjeruješ vlasniku ovog repozitorija, nemoj ga koristiti jer bi to moglo ugroziti tvoju instalaciju Discorda.\n\nPotvrdi dodavanje ovog repozitorija pritiskom na OK."))return void goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Odbijen sigurnosni upit"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ovaj repoyitorij nije poznat ili pouzdan (bez PGP provjere), prema tome, oprez. Provjeri vjeruješ li u potpunosti vlasnicima) ovog repoyitorija.\n\nZa rješavanje ovog problema, zamoli održavatelja repoyitorija da doda podršku za PGP.\n\nPotvrdi dodavanje ovog repozitorija pritiskom na OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Odbijen sigurnosni upit"}):goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Greška u nepovjerljivom PGP-u"})}},"Dodaj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Trgovina"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalirano")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Osvježi",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitoriji",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teme",confirmText:"Pregledaj teme",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Uljepšaj svoj Discord s temama"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Odaberi jednu od preko 100 tema za podešavanje i poboljšanje korisničkog sučelja"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Dodaci",confirmText:"Pregledaj dodatke",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Proširi funkcionalnost Discorda"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Dodaci povećavaju doživljaj poboljšanjima u samom programu"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Trgovina",confirmText:"Pogledaj trgovinu na početnom ekranu",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Pregledaj teme i dodatke u trgovini"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod koristi svoju vlastitu trgovinu za jednostavno pregledavanje i instaliranje"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Postavke",confirmText:"Prikaz GooseMod postavki",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Postavke-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Eksperimentalne funkcije",description:"Isprobaj nove eksperimentalne funkcije"},{name:"Pomoćni programi",description:"Spremaj sigurnosne kopije, obnovi GooseMod i još mnogo toga"},{name:"Podešavanja",description:"Prilagodi GooseMod vlastitim potrebama"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Koristi GooseMod postavke za prilagođavanje njegovih funkcija"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Postoje razne opcije koje možeš promijeniti"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Zajednica",confirmText:"Pridruži se GooseMod Discordu",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Postavljaj pitanja",description:"Postavi bilo kakva pitanja i zatraži podršku"},{name:"Vijesti",description:"Primaj najnovije vijesti i najave o GooseModu i srodnim projektima"},{name:"Uključi se u rad",description:"Pomozi s prijedlozima, pomogni drugima i još mnogo toga"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Pridruži se GooseMod zajednici"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pridruži se našem Discordu za dodatne informacije i više"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saznaj više",cancelText:"Ne zanima",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Trgovina",description:"Saznaj više o GooseMod trgovini i što se u njoj nalazi"},{name:"Postavke",description:"Saznaj više o postavkama za GooseMod i dodatke"},{name:"Zajednica",description:"Pridruži se našem Discordu, postavljaj pitanja, šalji povratne informacije, saznaj novosti i još mnogo toga"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Saznaj o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Prođi kroz kratki obilazak osnovnih funkcija GooseModa"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Dodaci"===e[1])),themes:e.settings.items.find((e=>"Teme"===e[1])),snippets:e.settings.items.find((e=>"Isječci"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teme"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teme","themes"),id:"gm-home-themes",text:"Teme",selected:!1})),c(t.createElement(a,{style:{display:S||"Dodaci"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Dodaci","plugins"),id:"gm-home-plugins",text:"Dodaci",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Isječci"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Isječci","snippets"),id:"gm-home-snippets",text:"Isječci",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Isječci"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Ukloni":"Dodaj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Dodaj",s.buttonText="Dodaj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Ukloni",s.buttonText="Ukloni",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Postavke":o="settings";break;case"Dodaci":o="plugins";break;case"Teme":o="themes";break;case"Isječci":o="snippets";break;case"Dnevnik promjena":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Postavke"),t?void 0:o("Dodaci"),t?void 0:o("Teme"),o("Dnevnik promjena")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduli",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduli"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Dodaci"===e[1]||"Teme"===e[1]||"Isječci"===e[1])||!t.snippets&&"Isječci"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Postavke":o="settings";break;case"Dodaci":o="plugins";break;case"Teme":o="themes";break;case"Isječci":o="snippets";break;case"Dnevnik promjena":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Dodaci"!==t[1]&&"Teme"!==t[1]&&"Isječci"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Dodaci"!==e.target.textContent&&"Teme"!==e.target.textContent&&"Isječci"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Dnevnik promjena",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduli"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Postavke",["",{type:"header",text:"Postavke"},{type:"toggle",text:"Dnevnik promjena GooseModa",subtext:"Prikaži GooseMod postavku „Dnevnik promjena”",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Glavni znakovi razdvajanja",subtext:"Prikaži razdjelnike između glavnih GooseMod postavki",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Trgovina na početnom ekranu",subtext:"Stavi opcije GooseMod trgovine na početni ekran umjesto u postavke",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Trgovina"},{type:"toggle",text:"Automatsko aktualiziranje",subtext:"Automatski aktualiziraj repozitorije i module svakih sat vremena",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Obavijesti za novi modul",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Izgled"},{type:"toggle",text:"GooseMod značke",subtext:"Pokazuje GooseMod značke",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Pomoćni programi"},{type:"text-and-button",text:"Isprazni predmemorije",subtext:"Potpuno uklanja većinu predmemorija koje GooseMod koristi",buttonText:"Isprazni",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Započni obilazak",subtext:"Ponovo prođi kroz GooseModov početni obilazak",buttonText:"Obilazak",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiraj podatke otklanjanja grešaka",subtext:"Kopira informacije o postavi i GooseModu za izvještavanje i otklanjanje grešaka",buttonText:"Kopiraj",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetiraj GooseMod",subtext:"Potpuno resetira GooseMod: uklanja sve postavke i module; kao prva instalacija",buttonText:"Resetiraj",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sigurnosna kopija"},{type:"text-and-button",text:"Stvori sigurnosnu kopiju",subtext:"Stvara datoteku za sigurnosnu kopiju tvojih GooseMod modula i postavki",buttonText:"Sigurnosna kopija",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnovi sigurnosnu kopiju",subtext:"Obnovi svoje GooseMod module i postavke putem sigurnosne kopije, **obnovi samo sigurnosne kopije kojima vjeruješ**",buttonText:"Obnovi",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Podešavanja",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Manje promjene u korisničkom sučelju kako bi GooseMod bio onakav kakvim ga ti želiš imati"},{type:"toggle",text:"Opća slika",subtext:"Koristi opću sliku u trgovini za module bez slika",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sklopiva kategorija početnog ekrana",subtext:"Omogući sklapanje kategorije početnog ekrana putem ikone",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentalno",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentalne postavke vjerojatno su nepotpune i nestabilne, čime smanjuju doživljaj"},{type:"toggle",experimental:!0,text:"Atributi podataka",subtext:"Dodaj atribute podataka nekim elementima za korištenje nekih tema",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Isječci",subtext:"Aktiviraj karticu „Isječci” u trgovini",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Prisili postavke teme",subtext:"Nametni automatski generirane postavke za sve teme",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Zvijezde",i="Sve",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Trgovina":"Instalirano";switch(r){case"A-Z":t.style.order="";break;case"Zadnje aktualizirano":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Zvijezde":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Trgovina"!==n&&n!==p||"Sve"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Trgovina";"Trgovina"!==n&&"Instalirano"!==n&&(n="Trgovina"),o.forEach(t);const a=""===d&&"Trgovina"===n&&"Sve"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nema rezultata"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nema rezultata",""!==d&&"Trgovina"===n&&"Sve"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nisu pronađeni rezultati, možda misliš na dodatke?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nisu pronađeni rezultati, možda misliš na teme?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Sve teme"!==c.textContent&&"Svi dodaci"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Dodaci","Teme"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Traži dodatke":"Traži teme",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Redoslijed",options:["Zvijezde","A-Z","Zadnje aktualizirano"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Sve"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Najivše zvijezda",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nedavno aktualizirano",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Svi dodaci":"Sve teme"},{type:"gm-footer"}]))),e.settings.createItem("Isječci",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Dnevnik promjena",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduli"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Dodaci"===e||"Teme"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teme":"Dodaci",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod trgovina"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod trgovina"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod trgovina"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod trgovina"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Ukloni",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instaliraj",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Dodaci"===e[1]||"Teme"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Ukloni":"Instaliraj",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod sponzor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod prevodilac","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod programer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod službeni Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Ukloni"===this.props.buttonText?"Instaliraj":"Ukloni",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teme"===e[1]))[2],d=goosemod.settings.items.find((e=>"Dodaci"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduli")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otvori poveznicu"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Ukloni"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Provjeren PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Nepovjerljiv PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Bez PGP-a",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitoriji"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neispravan repozitorij",{type:"error",timeout:5e3,subtext:"Neispravan format"});if(!confirm("Vanjski repozitoriji predstavljaju sigurnosne rizike jer ih ne kontroliraju programeri GooseModa. Ne snosimo odgovornost za bilo kakve opasnosti zbog vanjskih repozitorija koje su dodali korisnici.\n\nAko ne vjeruješ vlasniku ovog repozitorija, nemoj ga koristiti jer bi to moglo ugroziti tvoju instalaciju Discorda.\n\nPotvrdi dodavanje ovog repozitorija pritiskom na OK."))return void goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Odbijen sigurnosni upit"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ovaj repoyitorij nije poznat ili pouzdan (bez PGP provjere), prema tome, oprez. Provjeri vjeruješ li u potpunosti vlasnicima) ovog repoyitorija.\n\nZa rješavanje ovog problema, zamoli održavatelja repoyitorija da doda podršku za PGP.\n\nPotvrdi dodavanje ovog repozitorija pritiskom na OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Odbijen sigurnosni upit"}):goosemod.showToast("Prekinuto dodavanje repozitorija",{type:"danger",timeout:5e3,subtext:"Greška u nepovjerljivom PGP-u"})}},"Dodaj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Trgovina"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalirano")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Osvježi",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitoriji",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.hu.js b/goosemod.hu.js index e66216d4..89678b51 100644 --- a/goosemod.hu.js +++ b/goosemod.hu.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témák",confirmText:"Keress Témákat",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tedd gyönyörűvé a Discordot Témákkal"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Válassz több mint 100 téma közül, hogy szebbé tedd a Discord-ot"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Bővítmények",confirmText:"Keress bővítményeket",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tedd jobbá a Discord-od a felszín alatt"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"A bővítmények a felhasználói élményed teszik jobbá, mindezt az alkalmazásból"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Áruház",confirmText:"Az Áruház megnyitása a Főoldalról",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Keresgélj témákat és bővítményeket az Áruházban"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"A GooseMod a saját áruházát használja, ahol könnyen megtalálhatsz bármit"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Beállítások",confirmText:"GooseMod Beállítások megtekintése",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Beállítások-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kísérleti Beállítások",description:"Próbálj ki új kísérleti beállításokat"},{name:"Hasznos beállítások",description:"Készíts biztonsági mentéseket, állítsd vissza a GooseMod-ot, és még más"},{name:"Finomítások",description:"Finomítsd olyanra a GooseMod-ot amilyenre akarod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Itt testre szabhatod a GooseMod-ot"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Rengeteg beállítás van, amit kedvedre változtathatsz"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Közösség",confirmText:"Csatlakozz a GooseMod Discordhoz",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kérdezz bármit",description:"Kérdezz bármit, a segítői csapat majd segít"},{name:"Hírek/Újdonságok",description:"Olvasd el a legújabb híreket a GooseMod-ról, és egyéb projektekről"},{name:"Vegyél részt",description:"Segíts az ajánlásokkal, segíts mások problémáin, és sok más"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Csatlakozz a GooseMod Közösséghez"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"További információért csatlakozz a Discord szerverünkhöz"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Kezdjük",cancelText:"Nem érdekel",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Áruház",description:"Tudj meg többet a GooseMod Áruházról, és hogy mi van benne"},{name:"Beállítások",description:"Tudj meg többet a GooseMod és a bővítmények beállításairól"},{name:"Közösség",description:"Csatlakozz a Discord szerverünkhöz, ha hallani szeretnél az újdonságokról"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tudj meg többet a GooseMod-ról"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Menj keresztül egy kis körbevezetőn a GooseMod legalapabb funkcióiról"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Bővítmények"===e[1])),themes:e.settings.items.find((e=>"Témák"===e[1])),snippets:e.settings.items.find((e=>"Snippetek"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témák"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témák","themes"),id:"gm-home-themes",text:"Témák",selected:!1})),c(t.createElement(a,{style:{display:S||"Bővítmények"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Bővítmények","plugins"),id:"gm-home-plugins",text:"Bővítmények",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippetek"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippetek","snippets"),id:"gm-home-snippets",text:"Snippetek",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippetek"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Törlés":"Aktiválás",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Aktiválás",s.buttonText="Aktiválás",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Törlés",s.buttonText="Törlés",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Beállítások":o="settings";break;case"Bővítmények":o="plugins";break;case"Témák":o="themes";break;case"Snippetek":o="snippets";break;case"Frissítési Napló":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Beállítások"),t?void 0:o("Bővítmények"),t?void 0:o("Témák"),o("Frissítési Napló")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modulkezelő",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modulkezelő"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Bővítmények"===e[1]||"Témák"===e[1]||"Snippetek"===e[1])||!t.snippets&&"Snippetek"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Beállítások":o="settings";break;case"Bővítmények":o="plugins";break;case"Témák":o="themes";break;case"Snippetek":o="snippets";break;case"Frissítési Napló":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Bővítmények"!==t[1]&&"Témák"!==t[1]&&"Snippetek"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Bővítmények"!==e.target.textContent&&"Témák"!==e.target.textContent&&"Snippetek"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Frissítési Napló",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modulkezelő"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Beállítások",["",{type:"header",text:"Beállítások"},{type:"toggle",text:"GooseMod Frissítési Napló",subtext:"A GooseMod Frissítési napló beállítás mutatása",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Fő elválasztók",subtext:"Elválasztók mutatása a fő GooseMod beállítások között",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Áruház beállítások a fő oldalon",subtext:"Átrakja a GooseMod Áruház beállításait a főoldalra a beállítások oldal helyett",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Áruház"},{type:"toggle",text:"Automatikus Frissítések",subtext:"Automatikusan frissíti az adattárakat és modulokat óránként",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Megjelenés"},{type:"toggle",text:"GooseMod Kitűzök",subtext:"GooseMod kitűzőket mutat a profiloknál",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Hasznos funkciók"},{type:"text-and-button",text:"Felesleges fájlok törlése",subtext:"Kitörli a legtöbb GooseMod által használt felesleges fájlt",buttonText:"Teljes törlés",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Körbevezető indítása",subtext:"Újra körbevezet a GooseMod-on",buttonText:"Körbevezetés",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Debug Infók Másolása",subtext:"Kimásolja az információkat a GooseMod-ból jelentés és problémamegoldás céljából",buttonText:"Másolás",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"A GooseMod teljes visszaállítása",subtext:"Visszaviszi a GooseMod-ot olyan állapotba, mint amilyen először volt",buttonText:"Visszaállítás",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Biztonsági mentés"},{type:"text-and-button",text:"Biztonsági Mentés Készítése",subtext:"Készít egy fájlt, amiből visszaállíthatod a GooseMod moduljaidat és beállításaidat",buttonText:"Biztonsági mentés",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Biztonsági Mentés Betöltése",subtext:"Betölti a GooseMod moduljaidat és beállításaidat egy biztonsági mentés fájlból, **CSAK OLYAN BIZTONSÁGI MENTÉST TÖLTS BE, AMIBEN MEGBÍZOL**",buttonText:"Visszaállítás",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Bónusz beállítások",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kisebb változtatások, például kisebb UI változtatások, amikkel egyedivé teheted a GooseMod kinézetét"},{type:"toggle",text:"Helyettesítő kép",subtext:"Használj helyettesítő képeket az Áruházban a modulokhoz képek nélkül",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Összecsukható Főoldal kategória",subtext:"A Főoldal kategória egy ikon segítségével összecsukható",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Kísérlet alatt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"A kísérleti beállítások valószínűleg nem befejezettek és instabilak, amik ronthatnak a használati élményen"},{type:"toggle",experimental:!0,text:"Adatattribútumok",subtext:"adatattribútumokokat ad olyan elemekhez, amit aztán témák felhasználhatnak",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"CSS Töredékek",subtext:"CSS Snippet részleg megjelenítése az áruházban",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Téma beállítások kényszerítése",subtext:"Automatikusan generált téma beállítások kényszerítése",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Értékelés",i="Mind",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Áruház":"Telepítve";switch(r){case"ABC Sorrendben":t.style.order="";break;case"Nemrég Frissítve":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Értékelés":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Áruház"!==n&&n!==p||"Mind"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Áruház";"Áruház"!==n&&"Telepítve"!==n&&(n="Áruház"),o.forEach(t);const a=""===d&&"Áruház"===n&&"Mind"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nincs találat"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nincs találat",""!==d&&"Áruház"===n&&"Mind"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nincs találat, pluginokra gondoltál?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nincs találat, témákra gondoltál?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Összes Téma"!==c.textContent&&"Összes Plugin"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Bővítmények","Témák"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Pluginok keresése":"Témák keresése",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Rendezés",options:["Értékelés","ABC Sorrendben","Nemrég Frissítve"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Készítő",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Mind"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Legjobban értékelt",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nemrég Frissítve",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Összes Plugin":"Összes Téma"},{type:"gm-footer"}]))),e.settings.createItem("Snippetek",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Frissítési Napló",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modulkezelő"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Bővítmények"===e||"Témák"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témák":"Bővítmények",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Áruház"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Áruház"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Áruház"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Áruház"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Törlés",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Telepít",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Bővítmények"===e[1]||"Témák"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Törlés":"Telepít",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Szponzor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Fordító","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Fejlesztő","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("A GooseMod Hivatalos Discordja","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Törlés"===this.props.buttonText?"Telepít":"Törlés",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témák"===e[1]))[2],d=goosemod.settings.items.find((e=>"Bővítmények"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modulkezelő")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Törlés"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP-vel Ellenőrzött",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Által Meg-Nem-Bízott",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Nem PGP Által Ellenőrzött",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Adattárak"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Érvénytelen Adattár",{type:"error",timeout:5e3,subtext:"Érvénytelen Formátum"});if(!confirm("Külső adattárak biztonsági kockázattal járhatnak, mivel nem GooseMod fejlesztők kezelik őket. Nem vagyunk felelősek semmi fajta átlag felhasználók által publikált adattárak miatt okozott károkért.\n\nHa nem bízol az adattár fejlesztőjében, ne használd, ugyanis tönkreteheted a teljes discord telepítményedet.\n\nKérlek erősítsd meg az adattár hozzáadását az OK gombbal."))return void goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"Biztonsági Kérelem Elutasítva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ez az adattár ismeretlen, vagy nem megbízható (nincs PGP által ellenőrizve), légy különösen óvatos. Gondold át, hogy bízol -e az adattár fejlesztőjében.\n\nHogy kijavítsd ezt a hibát, jelentsd az adattár fejlesztőjének, hogy adjon az adattárhoz PGP támogatást.\n\nErősítsd meg az adattár hozzáadását az OK gombbal.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"Biztonsági Kérelem Elutasítva"}):goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"PGP Által Meg-Nem-Bízott Hiba"})}},"Aktiválás")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Áruház"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Telepítve")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Frissítés",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Adattárak",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témák",confirmText:"Keress Témákat",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tedd gyönyörűvé a Discordot Témákkal"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Válassz több mint 100 téma közül, hogy szebbé tedd a Discord-ot"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Bővítmények",confirmText:"Keress bővítményeket",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tedd jobbá a Discord-od a felszín alatt"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"A bővítmények a felhasználói élményed teszik jobbá, mindezt az alkalmazásból"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Áruház",confirmText:"Az Áruház megnyitása a Főoldalról",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Keresgélj témákat és bővítményeket az Áruházban"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"A GooseMod a saját áruházát használja, ahol könnyen megtalálhatsz bármit"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Beállítások",confirmText:"GooseMod Beállítások megtekintése",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Beállítások-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kísérleti Beállítások",description:"Próbálj ki új kísérleti beállításokat"},{name:"Hasznos beállítások",description:"Készíts biztonsági mentéseket, állítsd vissza a GooseMod-ot, és még más"},{name:"Finomítások",description:"Finomítsd olyanra a GooseMod-ot amilyenre akarod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Itt testre szabhatod a GooseMod-ot"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Rengeteg beállítás van, amit kedvedre változtathatsz"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Közösség",confirmText:"Csatlakozz a GooseMod Discordhoz",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Kérdezz bármit",description:"Kérdezz bármit, a segítői csapat majd segít"},{name:"Hírek/Újdonságok",description:"Olvasd el a legújabb híreket a GooseMod-ról, és egyéb projektekről"},{name:"Vegyél részt",description:"Segíts az ajánlásokkal, segíts mások problémáin, és sok más"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Csatlakozz a GooseMod Közösséghez"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"További információért csatlakozz a Discord szerverünkhöz"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Kezdjük",cancelText:"Nem érdekel",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Áruház",description:"Tudj meg többet a GooseMod Áruházról, és hogy mi van benne"},{name:"Beállítások",description:"Tudj meg többet a GooseMod és a bővítmények beállításairól"},{name:"Közösség",description:"Csatlakozz a Discord szerverünkhöz, ha hallani szeretnél az újdonságokról"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tudj meg többet a GooseMod-ról"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Menj keresztül egy kis körbevezetőn a GooseMod legalapabb funkcióiról"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Bővítmények"===e[1])),themes:e.settings.items.find((e=>"Témák"===e[1])),snippets:e.settings.items.find((e=>"Snippetek"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témák"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témák","themes"),id:"gm-home-themes",text:"Témák",selected:!1})),c(t.createElement(a,{style:{display:S||"Bővítmények"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Bővítmények","plugins"),id:"gm-home-plugins",text:"Bővítmények",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippetek"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippetek","snippets"),id:"gm-home-snippets",text:"Snippetek",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippetek"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Törlés":"Aktiválás",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Aktiválás",s.buttonText="Aktiválás",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Törlés",s.buttonText="Törlés",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Beállítások":o="settings";break;case"Bővítmények":o="plugins";break;case"Témák":o="themes";break;case"Snippetek":o="snippets";break;case"Frissítési Napló":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Beállítások"),t?void 0:o("Bővítmények"),t?void 0:o("Témák"),o("Frissítési Napló")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modulkezelő",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modulkezelő"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Bővítmények"===e[1]||"Témák"===e[1]||"Snippetek"===e[1])||!t.snippets&&"Snippetek"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Beállítások":o="settings";break;case"Bővítmények":o="plugins";break;case"Témák":o="themes";break;case"Snippetek":o="snippets";break;case"Frissítési Napló":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Bővítmények"!==t[1]&&"Témák"!==t[1]&&"Snippetek"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Bővítmények"!==e.target.textContent&&"Témák"!==e.target.textContent&&"Snippetek"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Frissítési Napló",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modulkezelő"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Beállítások",["",{type:"header",text:"Beállítások"},{type:"toggle",text:"GooseMod Frissítési Napló",subtext:"A GooseMod Frissítési napló beállítás mutatása",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Fő elválasztók",subtext:"Elválasztók mutatása a fő GooseMod beállítások között",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Áruház beállítások a fő oldalon",subtext:"Átrakja a GooseMod Áruház beállításait a főoldalra a beállítások oldal helyett",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Áruház"},{type:"toggle",text:"Automatikus Frissítések",subtext:"Automatikusan frissíti az adattárakat és modulokat óránként",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Megjelenés"},{type:"toggle",text:"GooseMod Kitűzök",subtext:"GooseMod kitűzőket mutat a profiloknál",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Hasznos funkciók"},{type:"text-and-button",text:"Felesleges fájlok törlése",subtext:"Kitörli a legtöbb GooseMod által használt felesleges fájlt",buttonText:"Teljes törlés",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Körbevezető indítása",subtext:"Újra körbevezet a GooseMod-on",buttonText:"Körbevezetés",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Debug Infók Másolása",subtext:"Kimásolja az információkat a GooseMod-ból jelentés és problémamegoldás céljából",buttonText:"Másolás",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"A GooseMod teljes visszaállítása",subtext:"Visszaviszi a GooseMod-ot olyan állapotba, mint amilyen először volt",buttonText:"Visszaállítás",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Biztonsági mentés"},{type:"text-and-button",text:"Biztonsági Mentés Készítése",subtext:"Készít egy fájlt, amiből visszaállíthatod a GooseMod moduljaidat és beállításaidat",buttonText:"Biztonsági mentés",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Biztonsági Mentés Betöltése",subtext:"Betölti a GooseMod moduljaidat és beállításaidat egy biztonsági mentés fájlból, **CSAK OLYAN BIZTONSÁGI MENTÉST TÖLTS BE, AMIBEN MEGBÍZOL**",buttonText:"Visszaállítás",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Bónusz beállítások",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kisebb változtatások, például kisebb UI változtatások, amikkel egyedivé teheted a GooseMod kinézetét"},{type:"toggle",text:"Helyettesítő kép",subtext:"Használj helyettesítő képeket az Áruházban a modulokhoz képek nélkül",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Összecsukható Főoldal kategória",subtext:"A Főoldal kategória egy ikon segítségével összecsukható",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Kísérlet alatt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"A kísérleti beállítások valószínűleg nem befejezettek és instabilak, amik ronthatnak a használati élményen"},{type:"toggle",experimental:!0,text:"Adatattribútumok",subtext:"adatattribútumokokat ad olyan elemekhez, amit aztán témák felhasználhatnak",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"CSS Töredékek",subtext:"CSS Snippet részleg megjelenítése az áruházban",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Téma beállítások kényszerítése",subtext:"Automatikusan generált téma beállítások kényszerítése",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Értékelés",i="Mind",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Áruház":"Telepítve";switch(r){case"ABC Sorrendben":t.style.order="";break;case"Nemrég Frissítve":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Értékelés":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Áruház"!==n&&n!==p||"Mind"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Áruház";"Áruház"!==n&&"Telepítve"!==n&&(n="Áruház"),o.forEach(t);const a=""===d&&"Áruház"===n&&"Mind"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nincs találat"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nincs találat",""!==d&&"Áruház"===n&&"Mind"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nincs találat, pluginokra gondoltál?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nincs találat, témákra gondoltál?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Összes Téma"!==c.textContent&&"Összes Plugin"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Bővítmények","Témák"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Pluginok keresése":"Témák keresése",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Rendezés",options:["Értékelés","ABC Sorrendben","Nemrég Frissítve"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Készítő",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Mind"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Legjobban értékelt",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nemrég Frissítve",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Összes Plugin":"Összes Téma"},{type:"gm-footer"}]))),e.settings.createItem("Snippetek",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Frissítési Napló",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modulkezelő"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Bővítmények"===e||"Témák"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témák":"Bővítmények",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Áruház"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Áruház"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Áruház"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Áruház"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Törlés",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Telepít",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Bővítmények"===e[1]||"Témák"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Törlés":"Telepít",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Szponzor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Fordító","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Fejlesztő","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("A GooseMod Hivatalos Discordja","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Törlés"===this.props.buttonText?"Telepít":"Törlés",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témák"===e[1]))[2],d=goosemod.settings.items.find((e=>"Bővítmények"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modulkezelő")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Törlés"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP-vel Ellenőrzött",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Által Meg-Nem-Bízott",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Nem PGP Által Ellenőrzött",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Adattárak"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Érvénytelen Adattár",{type:"error",timeout:5e3,subtext:"Érvénytelen Formátum"});if(!confirm("Külső adattárak biztonsági kockázattal járhatnak, mivel nem GooseMod fejlesztők kezelik őket. Nem vagyunk felelősek semmi fajta átlag felhasználók által publikált adattárak miatt okozott károkért.\n\nHa nem bízol az adattár fejlesztőjében, ne használd, ugyanis tönkreteheted a teljes discord telepítményedet.\n\nKérlek erősítsd meg az adattár hozzáadását az OK gombbal."))return void goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"Biztonsági Kérelem Elutasítva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Ez az adattár ismeretlen, vagy nem megbízható (nincs PGP által ellenőrizve), légy különösen óvatos. Gondold át, hogy bízol -e az adattár fejlesztőjében.\n\nHogy kijavítsd ezt a hibát, jelentsd az adattár fejlesztőjének, hogy adjon az adattárhoz PGP támogatást.\n\nErősítsd meg az adattár hozzáadását az OK gombbal.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"Biztonsági Kérelem Elutasítva"}):goosemod.showToast("Adattár Hozzáadása Visszavonva",{type:"danger",timeout:5e3,subtext:"PGP Által Meg-Nem-Bízott Hiba"})}},"Aktiválás")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Áruház"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Telepítve")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Frissítés",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Adattárak",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.it.js b/goosemod.it.js index 630a3617..9898a8ff 100644 --- a/goosemod.it.js +++ b/goosemod.it.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temi",confirmText:"Esplora Temi",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Rendi il tuo Discord più bello con dei temi"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Scegli tra oltre 100 temi per modificare e migliorare la tua interfaccia utente"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugin",confirmText:"Esplora Plugin",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Elabora il tuo Discord sotto al cofano"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"I plugin espandono la tua esperienza con dei miglioramenti all\'app stessa"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Negozio",confirmText:"Mostra il negozio nella home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Esplora Temi e Plugin nel negozio"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa il suo negozio, dove puoi guardare in giro e installare moduli facilmente"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Impostazioni",confirmText:"Visualizza le impostazioni GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Impostazioni-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funzionalità sperimentali",description:"Prova nuove funzionalità sperimentali"},{name:"Strumenti",description:"Crea backup, resetta GooseMod e altro ancora"},{name:"Aggiustamenti",description:"Personalizza GooseMod come ti pare"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Usa le impostazioni di GooseMod per personalizzare le sue funzioni"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ci sono varie opzioni per voi da cambiare"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunità",confirmText:"Unisciti al Discord di GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fai domande",description:"Fai qualsiasi domanda e ottieni supporto"},{name:"Novità",description:"Ricevi le ultime notizie e gli annunci di GooseMod e dei progetti correlati"},{name:"Partecipa anche tu",description:"Fornisci suggerimenti, aiuta gli altri e altro ancora"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Unisciti alla comunità di GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Unisciti al nostro Discord per ulteriori informazioni e altro ancora"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Scopri di più",cancelText:"Non sono interessato",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Negozio",description:"Scopri di più sul negozio di GooseMod e su cosa c\'è al suo interno"},{name:"Impostazioni",description:"Scopri di più riguardo alle impostazioni di GooseMod e dei plugin"},{name:"Comunità",description:"Entra nel nostro Discord per fare domande, dare feedback, tenerti aggiornato sulle notizie, ed altro"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Scopri di più su GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Fai un breve tour delle funzioni principali di GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugin"===e[1])),themes:e.settings.items.find((e=>"Temi"===e[1])),snippets:e.settings.items.find((e=>"Frammenti"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temi"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temi","themes"),id:"gm-home-themes",text:"Temi",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugin"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugin","plugins"),id:"gm-home-plugins",text:"Plugin",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Frammenti"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Frammenti","snippets"),id:"gm-home-snippets",text:"Frammenti",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Frammenti"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Rimuovi":"Aggiungi",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Aggiungi",s.buttonText="Aggiungi",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Rimuovi",s.buttonText="Rimuovi",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Impostazioni":o="settings";break;case"Plugin":o="plugins";break;case"Temi":o="themes";break;case"Frammenti":o="snippets";break;case"Registro dei cambiamenti":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Impostazioni"),t?void 0:o("Plugin"),t?void 0:o("Temi"),o("Registro dei cambiamenti")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduli GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduli GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugin"===e[1]||"Temi"===e[1]||"Frammenti"===e[1])||!t.snippets&&"Frammenti"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Impostazioni":o="settings";break;case"Plugin":o="plugins";break;case"Temi":o="themes";break;case"Frammenti":o="snippets";break;case"Registro dei cambiamenti":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugin"!==t[1]&&"Temi"!==t[1]&&"Frammenti"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugin"!==e.target.textContent&&"Temi"!==e.target.textContent&&"Frammenti"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro dei cambiamenti",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduli GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Ricarica","Riavvio richiesto","Per applicare questa impostazione **è necessario un riavvio**. **Potresti notare comportamenti strani** durante questa sessione prima del riavvio.")&&location.reload()};e.settings.createItem("Impostazioni",["",{type:"header",text:"Impostazioni"},{type:"toggle",text:"Registro delle modifiche di GooseMod",subtext:"Mostra le impostazioni \"Registro delle modifiche\" di GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separatori Principali",subtext:"Mostra i separatori tra le impostazioni principali di GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Negozio nella Home",subtext:"Mostra il Negozio GooseMod nella Home",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Negozio"},{type:"toggle",text:"Aggiornamenti automatici",subtext:"Aggiorna automaticamente le repo ed i moduli ogni ora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notifiche per nuovi moduli",subtext:"Mostra un avviso ogni volta che un nuovo modulo viene aggiunto allo Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aspetto"},{type:"toggle",text:"Badge di GooseMod",subtext:"Mostra i badge di GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Strumenti"},{type:"text-and-button",text:"Pulisci la cache",subtext:"Pulisci (rimuovi completamente) la maggior parte della cache che GooseMod utilizza",buttonText:"Pulisci",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Inizia il tour",subtext:"Guarda il tour iniziale di GooseMod nuovamente",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copia le info di debug",subtext:"Copia le informazioni del setup e di GooseMod per report e debugging",buttonText:"Copia",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Ripristina GooseMod",subtext:"Ripristina GooseMod completamente: rimuove tutte le preferenze ed i moduli; come quando viene installato la prima volta",buttonText:"Ripristina",onclick:async()=>{await e.confirmDialog("Resetta","Resetta GooseMod","Confermando resetterai completamente GooseMod, rimuovendo tutte le preferenze e moduli; come se avessi installato GooseMod per la prima volta. Questa azione è irreversibile.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Crea Backup",subtext:"Crea un file di backup per i tuoi moduli di GooseMod e per le impostazioni",buttonText:"Crea backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Ripristina da backup",subtext:"Ripristina i tuoi moduli di GooseMod e le impostazioni da un backup, **ripristina solo salvataggi di cui ti fidi**",buttonText:"Ripristina",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Aggiustamenti",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Piccoli cambiamenti come cambiamenti all IU per rendere GooseMod come lo vuoi tu"},{type:"toggle",text:"Immagine di rimpiazzamento",subtext:"Use un immagine di rimpiazzamento per i moduli nello store senza immagini",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria Home Riducibile",subtext:"Rendi la categoria nella home riducibile",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Sperimentale",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Le impostazioni sperimentali sono probabilmente incomplete o instabili, quindi potrebbero risultare in un\'esperienza ridotta"},{type:"toggle",experimental:!0,text:"Attributi Dati",subtext:"Aggiungi attributi dati ad alcuni elementi per alcuni temi da usare",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Frammenti",subtext:"Abilita la scheda Frammenti nel negozio",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Impostazioni per forzare il tema",subtext:"Mostra forzatamente le impostazioni auto-generate a tutti i temi",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stelle",i="Tutti",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Negozio":"Installato";switch(r){case"A-Z":t.style.order="";break;case"Ultimo Aggiornamento":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stelle":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Negozio"!==n&&n!==p||"Tutti"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Negozio";"Negozio"!==n&&"Installato"!==n&&(n="Negozio"),o.forEach(t);const a=""===d&&"Negozio"===n&&"Tutti"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nessun risultato trovato"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nessun risultato trovato",""!==d&&"Negozio"===n&&"Tutti"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nessun risultato trovato, intendevi i plugin?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nessun risultato trovato, intendevi temi?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tutti i temi"!==c.textContent&&"Tutti i plugin"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugin","Temi"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Cerca Plugin":"Cerca Temi",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordina per",options:["Stelle","A-Z","Ultimo Aggiornamento"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autore",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tutti"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Più Stellato",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Aggiornati di recente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tutti i plugin":"Tutti i temi"},{type:"gm-footer"}]))),e.settings.createItem("Frammenti",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro dei cambiamenti",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduli GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugin"===e||"Temi"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temi":"Plugin",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Negozio GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Negozio GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Negozio GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Negozio GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Rimuovi",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installare",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugin"===e[1]||"Temi"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Rimuovi":"Installare",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traduttore GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Sviluppatore GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Ufficiale GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Rimuovi"===this.props.buttonText?"Installare":"Rimuovi",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temi"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugin"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduli GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Apri Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Rimuovi"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificata con PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Non affidabile",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Non disponibile",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repo"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repo non valida",{type:"error",timeout:5e3,subtext:"Formato non valido"});if(!confirm("Le repo esterne pongono a rischio gli utenti, poiché non controllate dagli sviluppatori di GooseMod. Non siamo responsabili di danni causati dall\'aggiunta di repo esterne da parte degli utenti.\n\nSe non ti fidi del proprietario di questa repo non usarla, poiché potrebbe compromettere la tua installazione di Discord.\n\nPer favore conferma l\'aggiunta di questa repo premendo OK."))return void goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Rifiutata la richiesta di sicurezza"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Questa repo non è conosciuta o ritenuta affidabile (non è stata verificato con PGP), per cui sii estremamente cauto. Assicurati di fidarti del proprietario / dei proprietari della repo completamente.\n\nPer risolvere questo problema chiedi ai mantenitori della repo di aggiungere il supporto per PGP.\n\nPer favore, conferma nuovamente di voler aggiungere questa repo premendo OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Rifiutata la richiesta di sicurezza"}):goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Fallimento PGP Non affidabile"})}},"Aggiungi")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Negozio"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installato")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Aggiorna",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repo",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temi",confirmText:"Esplora Temi",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Rendi il tuo Discord più bello con dei temi"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Scegli tra oltre 100 temi per modificare e migliorare la tua interfaccia utente"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugin",confirmText:"Esplora Plugin",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Elabora il tuo Discord sotto al cofano"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"I plugin espandono la tua esperienza con dei miglioramenti all\'app stessa"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Negozio",confirmText:"Mostra il negozio nella home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Esplora Temi e Plugin nel negozio"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa il suo negozio, dove puoi guardare in giro e installare moduli facilmente"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Impostazioni",confirmText:"Visualizza le impostazioni GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Impostazioni-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funzionalità sperimentali",description:"Prova nuove funzionalità sperimentali"},{name:"Strumenti",description:"Crea backup, resetta GooseMod e altro ancora"},{name:"Aggiustamenti",description:"Personalizza GooseMod come ti pare"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Usa le impostazioni di GooseMod per personalizzare le sue funzioni"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ci sono varie opzioni per voi da cambiare"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunità",confirmText:"Unisciti al Discord di GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Fai domande",description:"Fai qualsiasi domanda e ottieni supporto"},{name:"Novità",description:"Ricevi le ultime notizie e gli annunci di GooseMod e dei progetti correlati"},{name:"Partecipa anche tu",description:"Fornisci suggerimenti, aiuta gli altri e altro ancora"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Unisciti alla comunità di GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Unisciti al nostro Discord per ulteriori informazioni e altro ancora"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Scopri di più",cancelText:"Non sono interessato",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Negozio",description:"Scopri di più sul negozio di GooseMod e su cosa c\'è al suo interno"},{name:"Impostazioni",description:"Scopri di più riguardo alle impostazioni di GooseMod e dei plugin"},{name:"Comunità",description:"Entra nel nostro Discord per fare domande, dare feedback, tenerti aggiornato sulle notizie, ed altro"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Scopri di più su GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Fai un breve tour delle funzioni principali di GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugin"===e[1])),themes:e.settings.items.find((e=>"Temi"===e[1])),snippets:e.settings.items.find((e=>"Frammenti"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temi"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temi","themes"),id:"gm-home-themes",text:"Temi",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugin"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugin","plugins"),id:"gm-home-plugins",text:"Plugin",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Frammenti"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Frammenti","snippets"),id:"gm-home-snippets",text:"Frammenti",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Frammenti"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Rimuovi":"Aggiungi",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Aggiungi",s.buttonText="Aggiungi",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Rimuovi",s.buttonText="Rimuovi",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Impostazioni":o="settings";break;case"Plugin":o="plugins";break;case"Temi":o="themes";break;case"Frammenti":o="snippets";break;case"Registro dei cambiamenti":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Impostazioni"),t?void 0:o("Plugin"),t?void 0:o("Temi"),o("Registro dei cambiamenti")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduli GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduli GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugin"===e[1]||"Temi"===e[1]||"Frammenti"===e[1])||!t.snippets&&"Frammenti"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Impostazioni":o="settings";break;case"Plugin":o="plugins";break;case"Temi":o="themes";break;case"Frammenti":o="snippets";break;case"Registro dei cambiamenti":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugin"!==t[1]&&"Temi"!==t[1]&&"Frammenti"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugin"!==e.target.textContent&&"Temi"!==e.target.textContent&&"Frammenti"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro dei cambiamenti",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduli GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Ricarica","Riavvio richiesto","Per applicare questa impostazione **è necessario un riavvio**. **Potresti notare comportamenti strani** durante questa sessione prima del riavvio.")&&location.reload()};e.settings.createItem("Impostazioni",["",{type:"header",text:"Impostazioni"},{type:"toggle",text:"Registro delle modifiche di GooseMod",subtext:"Mostra le impostazioni \"Registro delle modifiche\" di GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separatori Principali",subtext:"Mostra i separatori tra le impostazioni principali di GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Negozio nella Home",subtext:"Mostra il Negozio GooseMod nella Home",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Negozio"},{type:"toggle",text:"Aggiornamenti automatici",subtext:"Aggiorna automaticamente le repo ed i moduli ogni ora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notifiche per nuovi moduli",subtext:"Mostra un avviso ogni volta che un nuovo modulo viene aggiunto allo Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aspetto"},{type:"toggle",text:"Badge di GooseMod",subtext:"Mostra i badge di GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Strumenti"},{type:"text-and-button",text:"Pulisci la cache",subtext:"Pulisci (rimuovi completamente) la maggior parte della cache che GooseMod utilizza",buttonText:"Pulisci",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Inizia il tour",subtext:"Guarda il tour iniziale di GooseMod nuovamente",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copia le info di debug",subtext:"Copia le informazioni del setup e di GooseMod per report e debugging",buttonText:"Copia",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Ripristina GooseMod",subtext:"Ripristina GooseMod completamente: rimuove tutte le preferenze ed i moduli; come quando viene installato la prima volta",buttonText:"Ripristina",onclick:async()=>{await e.confirmDialog("Resetta","Resetta GooseMod","Confermando resetterai completamente GooseMod, rimuovendo tutte le preferenze e moduli; come se avessi installato GooseMod per la prima volta. Questa azione è irreversibile.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Crea Backup",subtext:"Crea un file di backup per i tuoi moduli di GooseMod e per le impostazioni",buttonText:"Crea backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Ripristina da backup",subtext:"Ripristina i tuoi moduli di GooseMod e le impostazioni da un backup, **ripristina solo salvataggi di cui ti fidi**",buttonText:"Ripristina",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Aggiustamenti",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Piccoli cambiamenti come cambiamenti all IU per rendere GooseMod come lo vuoi tu"},{type:"toggle",text:"Immagine di rimpiazzamento",subtext:"Use un immagine di rimpiazzamento per i moduli nello store senza immagini",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria Home Riducibile",subtext:"Rendi la categoria nella home riducibile",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Sperimentale",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Le impostazioni sperimentali sono probabilmente incomplete o instabili, quindi potrebbero risultare in un\'esperienza ridotta"},{type:"toggle",experimental:!0,text:"Attributi Dati",subtext:"Aggiungi attributi dati ad alcuni elementi per alcuni temi da usare",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Frammenti",subtext:"Abilita la scheda Frammenti nel negozio",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Impostazioni per forzare il tema",subtext:"Mostra forzatamente le impostazioni auto-generate a tutti i temi",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stelle",i="Tutti",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Negozio":"Installato";switch(r){case"A-Z":t.style.order="";break;case"Ultimo Aggiornamento":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stelle":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Negozio"!==n&&n!==p||"Tutti"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Negozio";"Negozio"!==n&&"Installato"!==n&&(n="Negozio"),o.forEach(t);const a=""===d&&"Negozio"===n&&"Tutti"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nessun risultato trovato"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nessun risultato trovato",""!==d&&"Negozio"===n&&"Tutti"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nessun risultato trovato, intendevi i plugin?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nessun risultato trovato, intendevi temi?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tutti i temi"!==c.textContent&&"Tutti i plugin"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugin","Temi"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Cerca Plugin":"Cerca Temi",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordina per",options:["Stelle","A-Z","Ultimo Aggiornamento"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autore",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tutti"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Più Stellato",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Aggiornati di recente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tutti i plugin":"Tutti i temi"},{type:"gm-footer"}]))),e.settings.createItem("Frammenti",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro dei cambiamenti",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduli GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugin"===e||"Temi"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temi":"Plugin",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Negozio GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Negozio GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Negozio GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Negozio GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Rimuovi",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installare",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugin"===e[1]||"Temi"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Rimuovi":"Installare",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Traduttore GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Sviluppatore GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Ufficiale GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Rimuovi"===this.props.buttonText?"Installare":"Rimuovi",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temi"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugin"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduli GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Apri Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Rimuovi"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificata con PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Non affidabile",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Non disponibile",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repo"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repo non valida",{type:"error",timeout:5e3,subtext:"Formato non valido"});if(!confirm("Le repo esterne pongono a rischio gli utenti, poiché non controllate dagli sviluppatori di GooseMod. Non siamo responsabili di danni causati dall\'aggiunta di repo esterne da parte degli utenti.\n\nSe non ti fidi del proprietario di questa repo non usarla, poiché potrebbe compromettere la tua installazione di Discord.\n\nPer favore conferma l\'aggiunta di questa repo premendo OK."))return void goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Rifiutata la richiesta di sicurezza"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Questa repo non è conosciuta o ritenuta affidabile (non è stata verificato con PGP), per cui sii estremamente cauto. Assicurati di fidarti del proprietario / dei proprietari della repo completamente.\n\nPer risolvere questo problema chiedi ai mantenitori della repo di aggiungere il supporto per PGP.\n\nPer favore, conferma nuovamente di voler aggiungere questa repo premendo OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Rifiutata la richiesta di sicurezza"}):goosemod.showToast("Annulla l\'aggiunta della repo",{type:"danger",timeout:5e3,subtext:"Fallimento PGP Non affidabile"})}},"Aggiungi")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Negozio"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installato")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Aggiorna",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repo",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.ja.js b/goosemod.ja.js index a54594d6..d4e0d5e7 100644 --- a/goosemod.ja.js +++ b/goosemod.ja.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"テーマ",confirmText:"テーマをブラウズ",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"テーマでDiscordを美しく"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"100以上のテーマをカスタマイズ"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"拡張機能",confirmText:"プラグインをブラウズする",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discordアプリの機能を拡張することができます"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"プラグインでアプリを改善し、あなたにとって使いやすいものに"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ストア",confirmText:"ホームでストアを表示",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"ストアでテーマとプラグインを探す"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseModは、独自のストアを使用しており、簡単に探して、インストールすることができます"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"設定",confirmText:"GooseMod設定の表示",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-設定-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"試験的な機能",description:"試験的な機能を試す"},{name:"ユーティリティ",description:"バックアップの作成、GooseModのリセットなど"},{name:"拡張機能",description:"GooseModを思いのままに調整"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModの設定を使用して、機能をカスタマイズ"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"変更するための様々な選択肢があります"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"コミュニティ",confirmText:"GooseMod のDiscordに参加",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"質問する",description:"質問してサポートを受ける"},{name:"ニュース",description:"GooseModや関連プロジェクトに関する最新情報やお知らせをお届けします"},{name:"参加する",description:"提案やサポートなどの支援をする"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModのコミュニティに参加"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"詳しくはDiscordに参加してください"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"詳細情報",cancelText:"興味なし",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ストア",description:"GooseMod には色々なアイテムがあります"},{name:"設定",description:"GooseModとプラグインの設定について確認"},{name:"コミュニティ",description:"Discordサーバーに参加して質問やフィードバック、最新情報などをチェック"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModについてもっと知る"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseModの主要な機能について紹介します"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"拡張機能"===e[1])),themes:e.settings.items.find((e=>"テーマ"===e[1])),snippets:e.settings.items.find((e=>"スニペット"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"テーマ"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("テーマ","themes"),id:"gm-home-themes",text:"テーマ",selected:!1})),c(t.createElement(a,{style:{display:S||"拡張機能"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("拡張機能","plugins"),id:"gm-home-plugins",text:"拡張機能",selected:!1})),k?c(t.createElement(a,{style:{display:S||"スニペット"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("スニペット","snippets"),id:"gm-home-snippets",text:"スニペット",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"スニペット"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"削除":"追加",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="追加",s.buttonText="追加",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="削除",s.buttonText="削除",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"設定":o="settings";break;case"拡張機能":o="plugins";break;case"テーマ":o="themes";break;case"スニペット":o="snippets";break;case"変更履歴":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("設定"),t?void 0:o("拡張機能"),t?void 0:o("テーマ"),o("変更履歴")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Mods",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Mods"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("拡張機能"===e[1]||"テーマ"===e[1]||"スニペット"===e[1])||!t.snippets&&"スニペット"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"設定":o="settings";break;case"拡張機能":o="plugins";break;case"テーマ":o="themes";break;case"スニペット":o="snippets";break;case"変更履歴":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"拡張機能"!==t[1]&&"テーマ"!==t[1]&&"スニペット"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"拡張機能"!==e.target.textContent&&"テーマ"!==e.target.textContent&&"スニペット"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","変更履歴",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Mods"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("更新","更新が必要です","この設定を有効にするには**更新が必要です**。 更新する前に、このセッションで**奇妙な挙動**が発生するかもしれません。")&&location.reload()};e.settings.createItem("設定",["",{type:"header",text:"設定"},{type:"toggle",text:"GooseMod 変更履歴",subtext:"設定にGooseModの変更履歴を表示する",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"閲覧設定",subtext:"GooseModの重要な設定を分割する",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"ストアセクションの位置",subtext:"ダイレクトメッセージの上にGooseModストアを置く",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"ストア"},{type:"toggle",text:"自動更新",subtext:"毎時間ごとに自動的にレポと拡張機能をアップデートします",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新しいモジュールの通知",subtext:"ストアに新しいモジュールが追加されるたびに通知します",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外観"},{type:"toggle",text:"GooseModプロフィールバッジ",subtext:"GooseModのカスタムバッジを示します",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"ユーティリティ"},{type:"text-and-button",text:"キャッシュをクリア",subtext:"GooseModのキャッシュをクリアします",buttonText:"クリア",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"ツアーをリスタート",subtext:"GooseModのツアーをはじめからやり直します",buttonText:"再起動する",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"デバッグ情報をコピー",subtext:"エラー報告のためにGooseModの情報をコピー",buttonText:"コピー",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseModをリセット",subtext:"GooseModを初期化:すべての設定と拡張機能がリセットされます",buttonText:"復元",onclick:async()=>{await e.confirmDialog("初期化","GooseModを初期化","GooseMod が完全に初期化され、すべての設定とモジュールが削除されます。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"バックアップ"},{type:"text-and-button",text:"バックアップする",subtext:"すべてGooseModのデータを保存する",buttonText:"今すぐバックアップ",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"バックアップから復元する",subtext:"バックアップからすべてのGooseModのデータを復元します\n**必ず自分のバックアップからのみ復元してください**",buttonText:"今すぐバックアップから復元",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"細かな設定",collapsed:!0,collapseOffset:1},{type:"subtext",text:"GooseModを自分好みにするための小さなUI変更などのマイナーチェンジ"},{type:"toggle",text:"代替画像",subtext:"ストアの画像の無いモジュールは代替画像が使用されます",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"折りたためるホームカテゴリー",subtext:"ホームカテゴリをアイコンで折り畳めるようにする",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"試験的な機能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"開発中の実験的な機能は不完全で不安定である可能性があります"},{type:"toggle",experimental:!0,text:"データ属性",subtext:"あるテーマは、このデータ属性に依存して機能しています",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"スニペット",subtext:"スニペットセクションを表示する",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"テーマ設定",subtext:"すべてテーマ設定を強制的に自動生成させる",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="スター件数順",i="すべて",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"ストア":"インストール済み";switch(r){case"A-Z順":t.style.order="";break;case"新着順":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"スター件数順":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"ストア"!==n&&n!==p||"すべて"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"ストア";"ストア"!==n&&"インストール済み"!==n&&(n="ストア"),o.forEach(t);const a=""===d&&"ストア"===n&&"すべて"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"ヒットなし"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="ヒットなし",""!==d&&"ストア"===n&&"すべて"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="何も見つかりませんでした。プラグインのことですか?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="見つかりませんでした。テーマのことですか?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"すべてのテーマ"!==c.textContent&&"すべての拡張機能"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["拡張機能","テーマ"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"拡張機能を検索":"テーマを検索",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"並べ替え",options:["スター件数順","A-Z順","新着順"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作成者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("すべて"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"みんなの推し",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最新の更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"すべての拡張機能":"すべてのテーマ"},{type:"gm-footer"}]))),e.settings.createItem("スニペット",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("変更履歴",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Mods"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"拡張機能"===e||"テーマ"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"テーマ":"拡張機能",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod ストア"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod ストア"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod ストア"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod ストア"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="削除",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="インストール",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"拡張機能"===e[1]||"テーマ"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"削除":"インストール",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod スポンサー","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻訳者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 開発者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 公式サーバー","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="削除"===this.props.buttonText?"インストール":"削除",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"テーマ"===e[1]))[2],d=goosemod.settings.items.find((e=>"拡張機能"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Mods")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"リンクを開く"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"削除"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP 認証あり",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP 認証されていません",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP 暗号化なし",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"リポジトリ"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("無効なレポ",{type:"error",timeout:5e3,subtext:"無効な形式"});if(!confirm("外部リポジトリは、GooseModの開発者が管理していないため、色々なリスクがあります。\n\nそのため、このリポジトリの所有者を信用できない場合は、Discordアプリを危険にさらす可能性がありますので、レポの追加しないでください。\n\nもし、追加を再確認するには、OKをクリックしてください。"))return void goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"OKをクリックしなかった"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("このレポが信頼できない(PGP暗号化なし)と判断しましたので、レポの所有者を完全に信用できない場合は特に注意してください。\n\nこの問題を解決するにはPGP暗号化のサポートを追加するようにレポの管理者に連絡してください\n\n追加を再確認するには、OKをクリックしてください。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"OKをクリックしなかった"}):goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"PGP 認証失敗"})}},"追加")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"ストア"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"インストール済み")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"更新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"リポジトリ",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"テーマ",confirmText:"テーマをブラウズ",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"テーマでDiscordを美しく"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"100以上のテーマをカスタマイズ"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"拡張機能",confirmText:"プラグインをブラウズする",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discordアプリの機能を拡張することができます"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"プラグインでアプリを改善し、あなたにとって使いやすいものに"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ストア",confirmText:"ホームでストアを表示",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"ストアでテーマとプラグインを探す"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseModは、独自のストアを使用しており、簡単に探して、インストールすることができます"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"設定",confirmText:"GooseMod設定の表示",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-設定-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"試験的な機能",description:"試験的な機能を試す"},{name:"ユーティリティ",description:"バックアップの作成、GooseModのリセットなど"},{name:"拡張機能",description:"GooseModを思いのままに調整"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModの設定を使用して、機能をカスタマイズ"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"変更するための様々な選択肢があります"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"コミュニティ",confirmText:"GooseMod のDiscordに参加",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"質問する",description:"質問してサポートを受ける"},{name:"ニュース",description:"GooseModや関連プロジェクトに関する最新情報やお知らせをお届けします"},{name:"参加する",description:"提案やサポートなどの支援をする"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModのコミュニティに参加"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"詳しくはDiscordに参加してください"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"詳細情報",cancelText:"興味なし",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ストア",description:"GooseMod には色々なアイテムがあります"},{name:"設定",description:"GooseModとプラグインの設定について確認"},{name:"コミュニティ",description:"Discordサーバーに参加して質問やフィードバック、最新情報などをチェック"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseModについてもっと知る"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseModの主要な機能について紹介します"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"拡張機能"===e[1])),themes:e.settings.items.find((e=>"テーマ"===e[1])),snippets:e.settings.items.find((e=>"スニペット"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"テーマ"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("テーマ","themes"),id:"gm-home-themes",text:"テーマ",selected:!1})),c(t.createElement(a,{style:{display:S||"拡張機能"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("拡張機能","plugins"),id:"gm-home-plugins",text:"拡張機能",selected:!1})),k?c(t.createElement(a,{style:{display:S||"スニペット"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("スニペット","snippets"),id:"gm-home-snippets",text:"スニペット",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"スニペット"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"削除":"追加",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="追加",s.buttonText="追加",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="削除",s.buttonText="削除",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"設定":o="settings";break;case"拡張機能":o="plugins";break;case"テーマ":o="themes";break;case"スニペット":o="snippets";break;case"変更履歴":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("設定"),t?void 0:o("拡張機能"),t?void 0:o("テーマ"),o("変更履歴")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Mods",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Mods"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("拡張機能"===e[1]||"テーマ"===e[1]||"スニペット"===e[1])||!t.snippets&&"スニペット"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"設定":o="settings";break;case"拡張機能":o="plugins";break;case"テーマ":o="themes";break;case"スニペット":o="snippets";break;case"変更履歴":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"拡張機能"!==t[1]&&"テーマ"!==t[1]&&"スニペット"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"拡張機能"!==e.target.textContent&&"テーマ"!==e.target.textContent&&"スニペット"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","変更履歴",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Mods"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("更新","更新が必要です","この設定を有効にするには**更新が必要です**。 更新する前に、このセッションで**奇妙な挙動**が発生するかもしれません。")&&location.reload()};e.settings.createItem("設定",["",{type:"header",text:"設定"},{type:"toggle",text:"GooseMod 変更履歴",subtext:"設定にGooseModの変更履歴を表示する",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"閲覧設定",subtext:"GooseModの重要な設定を分割する",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"ストアセクションの位置",subtext:"ダイレクトメッセージの上にGooseModストアを置く",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"ストア"},{type:"toggle",text:"自動更新",subtext:"毎時間ごとに自動的にレポと拡張機能をアップデートします",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新しいモジュールの通知",subtext:"ストアに新しいモジュールが追加されるたびに通知します",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外観"},{type:"toggle",text:"GooseModプロフィールバッジ",subtext:"GooseModのカスタムバッジを示します",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"ユーティリティ"},{type:"text-and-button",text:"キャッシュをクリア",subtext:"GooseModのキャッシュをクリアします",buttonText:"クリア",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"ツアーをリスタート",subtext:"GooseModのツアーをはじめからやり直します",buttonText:"再起動する",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"デバッグ情報をコピー",subtext:"エラー報告のためにGooseModの情報をコピー",buttonText:"コピー",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseModをリセット",subtext:"GooseModを初期化:すべての設定と拡張機能がリセットされます",buttonText:"復元",onclick:async()=>{await e.confirmDialog("初期化","GooseModを初期化","GooseMod が完全に初期化され、すべての設定とモジュールが削除されます。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"バックアップ"},{type:"text-and-button",text:"バックアップする",subtext:"すべてGooseModのデータを保存する",buttonText:"今すぐバックアップ",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"バックアップから復元する",subtext:"バックアップからすべてのGooseModのデータを復元します\n**必ず自分のバックアップからのみ復元してください**",buttonText:"今すぐバックアップから復元",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"細かな設定",collapsed:!0,collapseOffset:1},{type:"subtext",text:"GooseModを自分好みにするための小さなUI変更などのマイナーチェンジ"},{type:"toggle",text:"代替画像",subtext:"ストアの画像の無いモジュールは代替画像が使用されます",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"折りたためるホームカテゴリー",subtext:"ホームカテゴリをアイコンで折り畳めるようにする",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"試験的な機能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"開発中の実験的な機能は不完全で不安定である可能性があります"},{type:"toggle",experimental:!0,text:"データ属性",subtext:"あるテーマは、このデータ属性に依存して機能しています",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"スニペット",subtext:"スニペットセクションを表示する",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"テーマ設定",subtext:"すべてテーマ設定を強制的に自動生成させる",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="スター件数順",i="すべて",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"ストア":"インストール済み";switch(r){case"A-Z順":t.style.order="";break;case"新着順":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"スター件数順":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"ストア"!==n&&n!==p||"すべて"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"ストア";"ストア"!==n&&"インストール済み"!==n&&(n="ストア"),o.forEach(t);const a=""===d&&"ストア"===n&&"すべて"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"ヒットなし"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="ヒットなし",""!==d&&"ストア"===n&&"すべて"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="何も見つかりませんでした。プラグインのことですか?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="見つかりませんでした。テーマのことですか?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"すべてのテーマ"!==c.textContent&&"すべての拡張機能"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["拡張機能","テーマ"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"拡張機能を検索":"テーマを検索",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"並べ替え",options:["スター件数順","A-Z順","新着順"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作成者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("すべて"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"みんなの推し",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最新の更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"すべての拡張機能":"すべてのテーマ"},{type:"gm-footer"}]))),e.settings.createItem("スニペット",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("変更履歴",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Mods"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"拡張機能"===e||"テーマ"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"テーマ":"拡張機能",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod ストア"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod ストア"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod ストア"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod ストア"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="削除",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="インストール",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"拡張機能"===e[1]||"テーマ"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"削除":"インストール",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod スポンサー","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻訳者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 開発者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 公式サーバー","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="削除"===this.props.buttonText?"インストール":"削除",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"テーマ"===e[1]))[2],d=goosemod.settings.items.find((e=>"拡張機能"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Mods")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"リンクを開く"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"削除"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP 認証あり",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP 認証されていません",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP 暗号化なし",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"リポジトリ"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("無効なレポ",{type:"error",timeout:5e3,subtext:"無効な形式"});if(!confirm("外部リポジトリは、GooseModの開発者が管理していないため、色々なリスクがあります。\n\nそのため、このリポジトリの所有者を信用できない場合は、Discordアプリを危険にさらす可能性がありますので、レポの追加しないでください。\n\nもし、追加を再確認するには、OKをクリックしてください。"))return void goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"OKをクリックしなかった"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("このレポが信頼できない(PGP暗号化なし)と判断しましたので、レポの所有者を完全に信用できない場合は特に注意してください。\n\nこの問題を解決するにはPGP暗号化のサポートを追加するようにレポの管理者に連絡してください\n\n追加を再確認するには、OKをクリックしてください。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"OKをクリックしなかった"}):goosemod.showToast("レポの追加がキャンセルされました",{type:"danger",timeout:5e3,subtext:"PGP 認証失敗"})}},"追加")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"ストア"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"インストール済み")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"更新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"リポジトリ",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.js b/goosemod.js index ce862ac9..f0443a91 100644 --- a/goosemod.js +++ b/goosemod.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.themes#",confirmText:"#ootb.themes.confirm#",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.themes.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.themes.text.subtext#"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.plugins#",confirmText:"#ootb.plugins.confirm#",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.plugins.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.plugins.text.subtext#"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.store#",confirmText:"#ootb.store.confirm#",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"#ootb.store.text.main#"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"#ootb.store.text.subtext#"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.settings#",confirmText:"#ootb.settings.confirm#",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-#terms.settings#-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#ootb.settings.items.experimental_features.title#",description:"#ootb.settings.items.experimental_features.subtext#"},{name:"#ootb.settings.items.utilities.title#",description:"#ootb.settings.items.utilities.subtext#"},{name:"#ootb.settings.items.tweaks.title#",description:"#ootb.settings.items.tweaks.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.settings.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.settings.text.subtext#"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.community#",confirmText:"#ootb.community.confirm#",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#ootb.community.items.ask_questions.title#",description:"#ootb.community.items.ask_questions.subtext#"},{name:"#ootb.community.items.news.title#",description:"#ootb.community.items.news.subtext#"},{name:"#ootb.community.items.get_involved.title#",description:"#ootb.community.items.get_involved.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.community.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.community.text.subtext#"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"#ootb.start.confirm#",cancelText:"#ootb.start.cancel#",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#terms.store.store#",description:"#ootb.start.items.store.subtext#"},{name:"#terms.settings#",description:"#ootb.start.items.settings.subtext#"},{name:"#terms.community#",description:"#ootb.start.items.community.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.start.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.start.text.subtext#"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"#terms.store.plugins#"===e[1])),themes:e.settings.items.find((e=>"#terms.store.themes#"===e[1])),snippets:e.settings.items.find((e=>"#terms.store.snippets#"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"#terms.store.themes#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("#terms.store.themes#","themes"),id:"gm-home-themes",text:"#terms.store.themes#",selected:!1})),c(t.createElement(a,{style:{display:S||"#terms.store.plugins#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("#terms.store.plugins#","plugins"),id:"gm-home-plugins",text:"#terms.store.plugins#",selected:!1})),k?c(t.createElement(a,{style:{display:S||"#terms.store.snippets#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("#terms.store.snippets#","snippets"),id:"gm-home-snippets",text:"#terms.store.snippets#",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"#terms.store.snippets#"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"#terms.remove#":"#terms.add#",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="#terms.add#",s.buttonText="#terms.add#",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="#terms.remove#",s.buttonText="#terms.remove#",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"#terms.settings#":o="settings";break;case"#terms.store.plugins#":o="plugins";break;case"#terms.store.themes#":o="themes";break;case"#terms.store.snippets#":o="snippets";break;case"#terms.changelog#":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("#terms.settings#"),t?void 0:o("#terms.store.plugins#"),t?void 0:o("#terms.store.themes#"),o("#terms.changelog#")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"#terms.goosemod.modules#",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"#terms.goosemod.modules#"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("#terms.store.plugins#"===e[1]||"#terms.store.themes#"===e[1]||"#terms.store.snippets#"===e[1])||!t.snippets&&"#terms.store.snippets#"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"#terms.settings#":o="settings";break;case"#terms.store.plugins#":o="plugins";break;case"#terms.store.themes#":o="themes";break;case"#terms.store.snippets#":o="snippets";break;case"#terms.changelog#":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"#terms.store.plugins#"!==t[1]&&"#terms.store.themes#"!==t[1]&&"#terms.store.snippets#"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"#terms.store.plugins#"!==e.target.textContent&&"#terms.store.themes#"!==e.target.textContent&&"#terms.store.snippets#"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","#terms.changelog#",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"#terms.goosemod.modules#"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("#dialogs.refresh.button#","#dialogs.refresh.title#","#dialogs.refresh.note#")&&location.reload()};e.settings.createItem("#terms.settings#",["",{type:"header",text:"#terms.settings#"},{type:"toggle",text:"#settings.items.goosemod_change_log.title#",subtext:"#settings.items.goosemod_change_log.note#",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"#settings.items.main_separators.title#",subtext:"#settings.items.main_separators.note#",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"#settings.items.store_in_home.title#",subtext:"#settings.items.store_in_home.note#",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"#terms.store.store#"},{type:"toggle",text:"#settings.items.auto_update.title#",subtext:"#settings.items.auto_update.note#",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"#settings.items.new_module_notifications.title#",subtext:"#settings.items.new_module_notifications.note#",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"#settings.items.headers.appearance#"},{type:"toggle",text:"#settings.items.goosemod_badges.title#",subtext:"#settings.items.goosemod_badges.note#",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"#settings.items.headers.utilities#"},{type:"text-and-button",text:"#settings.items.purge_caches.title#",subtext:"#settings.items.purge_caches.note#",buttonText:"#settings.items.purge_caches.button#",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"#settings.items.start_tour.title#",subtext:"#settings.items.start_tour.note#",buttonText:"#settings.items.start_tour.button#",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"#settings.items.copy_debug_info.title#",subtext:"#settings.items.copy_debug_info.note#",buttonText:"#settings.items.copy_debug_info.button#",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"#settings.items.reset_goosemod.title#",subtext:"#settings.items.reset_goosemod.note#",buttonText:"#settings.items.reset_goosemod.button#",onclick:async()=>{await e.confirmDialog("#dialogs.reset_goosemod.button#","#dialogs.reset_goosemod.title#","#dialogs.reset_goosemod.note#")&&(await e.remove(),window.location.reload())}},{type:"header",text:"#settings.items.headers.backup#"},{type:"text-and-button",text:"#settings.items.create_backup.title#",subtext:"#settings.items.create_backup.note#",buttonText:"#settings.items.create_backup.button#",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"#settings.items.restore_backup.title#",subtext:"#settings.items.restore_backup.note#",buttonText:"#settings.items.restore_backup.button#",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"#settings.items.headers.tweaks#",collapsed:!0,collapseOffset:1},{type:"subtext",text:"#settings.items.subtexts.tweaks_description#"},{type:"toggle",text:"#settings.items.placeholder_image.title#",subtext:"#settings.items.placeholder_image.note#",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"#settings.items.collapsible_home_category.title#",subtext:"#settings.items.collapsible_home_category.note#",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"#settings.items.headers.experimental#",collapsed:!0,collapseOffset:1},{type:"subtext",text:"#settings.items.subtexts.experimental_warning#"},{type:"toggle",experimental:!0,text:"#settings.items.data_attributes.title#",subtext:"#settings.items.data_attributes.note#",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"#settings.items.snippets.title#",subtext:"#settings.items.snippets.note#",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"#settings.items.force_theme_settings.title#",subtext:"#settings.items.force_theme_settings.note#",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="#store.options.sort.stars#",i="#store.options.author.all#",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"#store.options.tabs.store#":"#store.options.tabs.imported#";switch(r){case"#store.options.sort.az#":t.style.order="";break;case"#store.options.sort.last_updated#":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"#store.options.sort.stars#":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"#store.options.tabs.store#"!==n&&n!==p||"#store.options.author.all#"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"#store.options.tabs.store#";"#store.options.tabs.store#"!==n&&"#store.options.tabs.imported#"!==n&&(n="#store.options.tabs.store#"),o.forEach(t);const a=""===d&&"#store.options.tabs.store#"===n&&"#store.options.author.all#"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"#store.search_results_hint.none#"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="#store.search_results_hint.none#",""!==d&&"#store.options.tabs.store#"===n&&"#store.options.author.all#"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="#store.search_results_hint.other_category.plugins#",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="#store.search_results_hint.other_category.themes#",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"#store.categories.all.themes#"!==c.textContent&&"#store.categories.all.plugins#"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["#terms.store.plugins#","#terms.store.themes#"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"#store.options.search.placeholder.plugins#":"#store.options.search.placeholder.themes#",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"#store.options.sort.label#",options:["#store.options.sort.stars#","#store.options.sort.az#","#store.options.sort.last_updated#"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"#store.options.author.label#",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("#store.options.author.all#"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"#store.categories.top_starred#",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"#store.categories.recently_updated#",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"#store.categories.all.plugins#":"#store.categories.all.themes#"},{type:"gm-footer"}]))),e.settings.createItem("#terms.store.snippets#",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("#terms.changelog#",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("#terms.goosemod.modules#"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"#terms.store.plugins#"===e||"#terms.store.themes#"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"#terms.store.themes#":"#terms.store.plugins#",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"#terms.goosemod.store#"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"#terms.goosemod.store#"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"#terms.goosemod.store#"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"#terms.goosemod.store#"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="#terms.remove#",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="#terms.install#",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"#terms.store.plugins#"===e[1]||"#terms.store.themes#"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"#terms.remove#":"#terms.install#",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("#badges.sponsor#","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("#badges.translator#","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("#badges.developer#","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("#badges.guild#","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="#terms.remove#"===this.props.buttonText?"#terms.install#":"#terms.remove#",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"#terms.store.themes#"===e[1]))[2],d=goosemod.settings.items.find((e=>"#terms.store.plugins#"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"#terms.goosemod.modules#")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"#terms.openLink#"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"#terms.remove#"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="#store.pgp.verified#",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="#store.pgp.untrusted#",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="#store.pgp.unknown#",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"#terms.store.repos#"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("#toasts.add_repo.invalid_repo.text#",{type:"error",timeout:5e3,subtext:"#toasts.add_repo.invalid_repo.subtext#"});if(!confirm("#modals.external_repo_security.main#"))return void goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.refused#"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("#modals.external_repo_security.bad_pgp#")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.refused#"}):goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.pgp#"})}},"#terms.add#")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"#store.options.tabs.store#"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"#store.options.tabs.imported#")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"#terms.refresh#",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"#terms.store.repos#",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.themes#",confirmText:"#ootb.themes.confirm#",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.themes.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.themes.text.subtext#"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.plugins#",confirmText:"#ootb.plugins.confirm#",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.plugins.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.plugins.text.subtext#"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.store.store#",confirmText:"#ootb.store.confirm#",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"#ootb.store.text.main#"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"#ootb.store.text.subtext#"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.settings#",confirmText:"#ootb.settings.confirm#",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-#terms.settings#-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#ootb.settings.items.experimental_features.title#",description:"#ootb.settings.items.experimental_features.subtext#"},{name:"#ootb.settings.items.utilities.title#",description:"#ootb.settings.items.utilities.subtext#"},{name:"#ootb.settings.items.tweaks.title#",description:"#ootb.settings.items.tweaks.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.settings.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.settings.text.subtext#"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"#terms.community#",confirmText:"#ootb.community.confirm#",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#ootb.community.items.ask_questions.title#",description:"#ootb.community.items.ask_questions.subtext#"},{name:"#ootb.community.items.news.title#",description:"#ootb.community.items.news.subtext#"},{name:"#ootb.community.items.get_involved.title#",description:"#ootb.community.items.get_involved.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.community.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.community.text.subtext#"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"#ootb.start.confirm#",cancelText:"#ootb.start.cancel#",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"#terms.store.store#",description:"#ootb.start.items.store.subtext#"},{name:"#terms.settings#",description:"#ootb.start.items.settings.subtext#"},{name:"#terms.community#",description:"#ootb.start.items.community.subtext#"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"#ootb.start.text.main#"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"#ootb.start.text.subtext#"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"#terms.store.plugins#"===e[1])),themes:e.settings.items.find((e=>"#terms.store.themes#"===e[1])),snippets:e.settings.items.find((e=>"#terms.store.snippets#"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"#terms.store.themes#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("#terms.store.themes#","themes"),id:"gm-home-themes",text:"#terms.store.themes#",selected:!1})),c(t.createElement(a,{style:{display:S||"#terms.store.plugins#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("#terms.store.plugins#","plugins"),id:"gm-home-plugins",text:"#terms.store.plugins#",selected:!1})),k?c(t.createElement(a,{style:{display:S||"#terms.store.snippets#"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("#terms.store.snippets#","snippets"),id:"gm-home-snippets",text:"#terms.store.snippets#",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"#terms.store.snippets#"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"#terms.remove#":"#terms.add#",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="#terms.add#",s.buttonText="#terms.add#",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="#terms.remove#",s.buttonText="#terms.remove#",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"#terms.settings#":o="settings";break;case"#terms.store.plugins#":o="plugins";break;case"#terms.store.themes#":o="themes";break;case"#terms.store.snippets#":o="snippets";break;case"#terms.changelog#":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("#terms.settings#"),t?void 0:o("#terms.store.plugins#"),t?void 0:o("#terms.store.themes#"),o("#terms.changelog#")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"#terms.goosemod.modules#",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"#terms.goosemod.modules#"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("#terms.store.plugins#"===e[1]||"#terms.store.themes#"===e[1]||"#terms.store.snippets#"===e[1])||!t.snippets&&"#terms.store.snippets#"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"#terms.settings#":o="settings";break;case"#terms.store.plugins#":o="plugins";break;case"#terms.store.themes#":o="themes";break;case"#terms.store.snippets#":o="snippets";break;case"#terms.changelog#":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"#terms.store.plugins#"!==t[1]&&"#terms.store.themes#"!==t[1]&&"#terms.store.snippets#"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"#terms.store.plugins#"!==e.target.textContent&&"#terms.store.themes#"!==e.target.textContent&&"#terms.store.snippets#"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","#terms.changelog#",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"#terms.goosemod.modules#"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("#dialogs.refresh.button#","#dialogs.refresh.title#","#dialogs.refresh.note#")&&location.reload()};e.settings.createItem("#terms.settings#",["",{type:"header",text:"#terms.settings#"},{type:"toggle",text:"#settings.items.goosemod_change_log.title#",subtext:"#settings.items.goosemod_change_log.note#",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"#settings.items.main_separators.title#",subtext:"#settings.items.main_separators.note#",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"#settings.items.store_in_home.title#",subtext:"#settings.items.store_in_home.note#",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"#terms.store.store#"},{type:"toggle",text:"#settings.items.auto_update.title#",subtext:"#settings.items.auto_update.note#",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"#settings.items.new_module_notifications.title#",subtext:"#settings.items.new_module_notifications.note#",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"#settings.items.headers.appearance#"},{type:"toggle",text:"#settings.items.goosemod_badges.title#",subtext:"#settings.items.goosemod_badges.note#",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"#settings.items.headers.utilities#"},{type:"text-and-button",text:"#settings.items.purge_caches.title#",subtext:"#settings.items.purge_caches.note#",buttonText:"#settings.items.purge_caches.button#",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"#settings.items.start_tour.title#",subtext:"#settings.items.start_tour.note#",buttonText:"#settings.items.start_tour.button#",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"#settings.items.copy_debug_info.title#",subtext:"#settings.items.copy_debug_info.note#",buttonText:"#settings.items.copy_debug_info.button#",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"#settings.items.reset_goosemod.title#",subtext:"#settings.items.reset_goosemod.note#",buttonText:"#settings.items.reset_goosemod.button#",onclick:async()=>{await e.confirmDialog("#dialogs.reset_goosemod.button#","#dialogs.reset_goosemod.title#","#dialogs.reset_goosemod.note#")&&(await e.remove(),window.location.reload())}},{type:"header",text:"#settings.items.headers.backup#"},{type:"text-and-button",text:"#settings.items.create_backup.title#",subtext:"#settings.items.create_backup.note#",buttonText:"#settings.items.create_backup.button#",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"#settings.items.restore_backup.title#",subtext:"#settings.items.restore_backup.note#",buttonText:"#settings.items.restore_backup.button#",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"#settings.items.headers.tweaks#",collapsed:!0,collapseOffset:1},{type:"subtext",text:"#settings.items.subtexts.tweaks_description#"},{type:"toggle",text:"#settings.items.placeholder_image.title#",subtext:"#settings.items.placeholder_image.note#",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"#settings.items.collapsible_home_category.title#",subtext:"#settings.items.collapsible_home_category.note#",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"#settings.items.headers.experimental#",collapsed:!0,collapseOffset:1},{type:"subtext",text:"#settings.items.subtexts.experimental_warning#"},{type:"toggle",experimental:!0,text:"#settings.items.data_attributes.title#",subtext:"#settings.items.data_attributes.note#",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"#settings.items.snippets.title#",subtext:"#settings.items.snippets.note#",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"#settings.items.force_theme_settings.title#",subtext:"#settings.items.force_theme_settings.note#",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="#store.options.sort.stars#",i="#store.options.author.all#",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"#store.options.tabs.store#":"#store.options.tabs.imported#";switch(r){case"#store.options.sort.az#":t.style.order="";break;case"#store.options.sort.last_updated#":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"#store.options.sort.stars#":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"#store.options.tabs.store#"!==n&&n!==p||"#store.options.author.all#"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"#store.options.tabs.store#";"#store.options.tabs.store#"!==n&&"#store.options.tabs.imported#"!==n&&(n="#store.options.tabs.store#"),o.forEach(t);const a=""===d&&"#store.options.tabs.store#"===n&&"#store.options.author.all#"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"#store.search_results_hint.none#"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="#store.search_results_hint.none#",""!==d&&"#store.options.tabs.store#"===n&&"#store.options.author.all#"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="#store.search_results_hint.other_category.plugins#",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="#store.search_results_hint.other_category.themes#",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"#store.categories.all.themes#"!==c.textContent&&"#store.categories.all.plugins#"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["#terms.store.plugins#","#terms.store.themes#"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"#store.options.search.placeholder.plugins#":"#store.options.search.placeholder.themes#",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"#store.options.sort.label#",options:["#store.options.sort.stars#","#store.options.sort.az#","#store.options.sort.last_updated#"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"#store.options.author.label#",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("#store.options.author.all#"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"#store.categories.top_starred#",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"#store.categories.recently_updated#",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"#store.categories.all.plugins#":"#store.categories.all.themes#"},{type:"gm-footer"}]))),e.settings.createItem("#terms.store.snippets#",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("#terms.changelog#",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("#terms.goosemod.modules#"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"#terms.store.plugins#"===e||"#terms.store.themes#"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"#terms.store.themes#":"#terms.store.plugins#",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"#terms.goosemod.store#"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"#terms.goosemod.store#"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"#terms.goosemod.store#"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"#terms.goosemod.store#"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="#terms.remove#",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="#terms.install#",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"#terms.store.plugins#"===e[1]||"#terms.store.themes#"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"#terms.remove#":"#terms.install#",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("#badges.sponsor#","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("#badges.translator#","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("#badges.developer#","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("#badges.guild#","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="#terms.remove#"===this.props.buttonText?"#terms.install#":"#terms.remove#",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"#terms.store.themes#"===e[1]))[2],d=goosemod.settings.items.find((e=>"#terms.store.plugins#"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"#terms.goosemod.modules#")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"#terms.openLink#"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"#terms.remove#"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="#store.pgp.verified#",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="#store.pgp.untrusted#",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="#store.pgp.unknown#",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"#terms.store.repos#"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("#toasts.add_repo.invalid_repo.text#",{type:"error",timeout:5e3,subtext:"#toasts.add_repo.invalid_repo.subtext#"});if(!confirm("#modals.external_repo_security.main#"))return void goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.refused#"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("#modals.external_repo_security.bad_pgp#")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.refused#"}):goosemod.showToast("#toasts.add_repo.cancelled.text#",{type:"danger",timeout:5e3,subtext:"#toasts.add_repo.cancelled.reasons.pgp#"})}},"#terms.add#")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"#store.options.tabs.store#"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"#store.options.tabs.imported#")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"#terms.refresh#",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"#terms.store.repos#",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod diff --git a/goosemod.ko.js b/goosemod.ko.js index e7de5343..d034f4fd 100644 --- a/goosemod.ko.js +++ b/goosemod.ko.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"테마",confirmText:"테마 찾아보기",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"테마로 사용자의 Discord를 멋있게 꾸미기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"100개 이상의 테마 중에서 선택하여 사용자 인터페이스를 조정하고 향상시키십시오"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"플러그인",confirmText:"플러그인 찾아보기",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discord 앱의 기능을 확장할 수 있습니다"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"플러그인은 앱 자체의 개선으로 사용자의 경험을 향상시킵니다"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"스토어",confirmText:"홈 화면에서 스토어 보기",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"스토어에서 테마 및 플러그인 찾아보기"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod는 여러분이 쉽게 둘러보고 설치할 수 있는 자체 스토어를 사용합니다"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"설정",confirmText:"GooseMod 설정 보기",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-설정-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"실험적 기능",description:"새로운 실험적 기능 체험하기"},{name:"유틸리티",description:"백업 만들기, GooseMod 재설정 등"},{name:"트윅",description:"GooseMod를 원하는 방식으로 트윅"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"기능을 사용자 정의하기 위한 GooseMod의 설정 사용"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"변경할 수 있는 다양한 옵션이 있습니다"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"커뮤니티",confirmText:"GooseMod Discord 가입하기",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"질문하기",description:"질문하고 지원 받기"},{name:"소식",description:"GooseMod 및 관련 프로젝트에 대한 최신 소식 및 공지 사항 받기"},{name:"참여하기",description:"제안에 대한 도움, 다른 사람 지원, 기타 드등"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod의 커뮤니티 가입하기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"더 많은 정보를 원하시면 Discord에 가입하세요"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"더 알아보기",cancelText:"관심 없음",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"스토어",description:"GooseMod의 스토어 및 그 내용에 대해 알아보기"},{name:"설정",description:"GooseMod 및 플러그인 설정 알아보기"},{name:"커뮤니티",description:"Discord에 가입하여 질문하고, 피드백을 제공하고, 최신 소식을 받아보세요"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod에 대해 알아보기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseMod의 핵심 기능에 대해 짧게 둘러보기"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"플러그인"===e[1])),themes:e.settings.items.find((e=>"테마"===e[1])),snippets:e.settings.items.find((e=>"스니펫"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"테마"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("테마","themes"),id:"gm-home-themes",text:"테마",selected:!1})),c(t.createElement(a,{style:{display:S||"플러그인"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("플러그인","plugins"),id:"gm-home-plugins",text:"플러그인",selected:!1})),k?c(t.createElement(a,{style:{display:S||"스니펫"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("스니펫","snippets"),id:"gm-home-snippets",text:"스니펫",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"스니펫"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"제거":"추가",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="추가",s.buttonText="추가",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="제거",s.buttonText="제거",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"설정":o="settings";break;case"플러그인":o="plugins";break;case"테마":o="themes";break;case"스니펫":o="snippets";break;case"변경 사항":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("설정"),t?void 0:o("플러그인"),t?void 0:o("테마"),o("변경 사항")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 모듈",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 모듈"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("플러그인"===e[1]||"테마"===e[1]||"스니펫"===e[1])||!t.snippets&&"스니펫"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"설정":o="settings";break;case"플러그인":o="plugins";break;case"테마":o="themes";break;case"스니펫":o="snippets";break;case"변경 사항":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"플러그인"!==t[1]&&"테마"!==t[1]&&"스니펫"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"플러그인"!==e.target.textContent&&"테마"!==e.target.textContent&&"스니펫"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","변경 사항",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 모듈"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("새로고침","새로 고침 필요","이 설정을 적용하려면 새로 고침이 필요합니다**. 새로 고침하기 전에이 세션에서 이상한 행동 **이 발생할 수 있습니다.")&&location.reload()};e.settings.createItem("설정",["",{type:"header",text:"설정"},{type:"toggle",text:"GooseMod 변경 로그",subtext:"GooseMod \"변경 로그\" 설정 표시",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"메인 구분자",subtext:"메인 GooseMod 설정 사이에 구분자 표시",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"홈 화면의 스토어",subtext:"설정 대신 홈에 GooseMod 스토어 옵션 넣기",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"스토어"},{type:"toggle",text:"자동 업데이트",subtext:"매시간 자동으로 저장소 및 모듈 업데이트",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"새 모듈 알림",subtext:"스토어에 새 모듈이 추가될 때마다 알림을 표시합니다.",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"외관"},{type:"toggle",text:"GooseMod 배지",subtext:"GooseMod의 배지 표시",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"유틸리티"},{type:"text-and-button",text:"캐시 지우기",subtext:"GooseMod가 사용하는 캐시 지우기 (완전히 제거)",buttonText:"지우기",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"둘러보기 시작",subtext:"GooseMod의 둘러보기 시작하기 다시 살펴보기",buttonText:"둘러보기",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"디버그 정보 복사",subtext:"보고 및 디버깅을 위해 설정 및 GooseMod에 대한 정보를 복사합니다",buttonText:"복사하기",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod 재설정",subtext:"GooseMod완전히 재설정: 모든 기본 설정과 모듈을 제거합니다. 처음 설치하는 것처럼",buttonText:"재설정",onclick:async()=>{await e.confirmDialog("재설정","구스 모드 재설정","확인하면 GooseMod가 완전히 재설정되어 모든 환경 설정과 모듈이 제거됩니다. 마치 구스 모드 (GooseMod)를 처음 설치 한 것처럼. 이것은 돌이킬 수 없습니다.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"백업"},{type:"text-and-button",text:"백업 만들기",subtext:"GooseMod 모듈 및 설정을 백업하기위한 파일 만들기",buttonText:"백업",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"백업 복원하기",subtext:"백업 파일을 통해 사용자의 GooseMod 모듈 및 설정을 복원하고, **신뢰할 수 있는 백업만 복원**합니다",buttonText:"복원하기",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"변경",collapsed:!0,collapseOffset:1},{type:"subtext",text:"작은 UI 변경과 같은 사소한 변경으로 GooseMod를 원하는 대로 만들 수 있습니다"},{type:"toggle",text:"자리표시자 이미지",subtext:"이미지가 없는 모듈의 경우 스토어에서 자리표시자 이미지 사용",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"접을 수 있는 홈 범주",subtext:"아이콘을 통해 홈 범주를 접을 수 있도록 합니다",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"실험적",collapsed:!0,collapseOffset:1},{type:"subtext",text:"실험적 설정은 불완전하고 불안정하여, 경험의 감소로 이어질 수 있습니다"},{type:"toggle",experimental:!0,text:"데이터 속성",subtext:"사용할 일부 테마에 대해 일부 요소에 데이터 속성 추가하기",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"스니펫",subtext:"스토어에서 스니펫 탭 활성화",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"강제 테마 설정",subtext:"모든 테마에 대해 강제 자동 생성 설정",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="별점",i="모두",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"스토어":"설치됨";switch(r){case"A-Z순":t.style.order="";break;case"마지막 업데이트":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"별점":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"스토어"!==n&&n!==p||"모두"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"스토어";"스토어"!==n&&"설치됨"!==n&&(n="스토어"),o.forEach(t);const a=""===d&&"스토어"===n&&"모두"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"검색된 결과가 없습니다."!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="검색된 결과가 없습니다.",""!==d&&"스토어"===n&&"모두"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="검색된 결과가 없습니다. 플러그인을 찾으시는 건가요?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="검색된 결과가 없습니다. 테마를 찾으시는 건가요?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"모든 테마"!==c.textContent&&"모든 플러그인"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["플러그인","테마"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"플러그인 검색":"테마 검색",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"정렬 기준",options:["별점","A-Z순","마지막 업데이트"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"작성자",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("모두"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"최고 별점",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"최근 업데이트됨",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"모든 플러그인":"모든 테마"},{type:"gm-footer"}]))),e.settings.createItem("스니펫",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("변경 사항",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 모듈"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"플러그인"===e||"테마"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"테마":"플러그인",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 스토어"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 스토어"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 스토어"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 스토어"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="제거",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="설치",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"플러그인"===e[1]||"테마"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"제거":"설치",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 후원자","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 번역자","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 개발자","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 공식 Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="제거"===this.props.buttonText?"설치":"제거",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"테마"===e[1]))[2],d=goosemod.settings.items.find((e=>"플러그인"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 모듈")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"링크 열기"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"제거"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP 검증됨",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP 신뢰할 수 없음",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP 없음",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"저장소"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("잘못된 저장소",{type:"error",timeout:5e3,subtext:"잘못된 형식"});if(!confirm("외부 저장소는 GooseMod 개발자가 제어하지 않기 때문에 보안 위험이 있습니다. 사용자가 추가한 외부 저장소로 인한 위험에 대해서는 책임지지 않습니다.\n\n이 저장소의 소유자를 신뢰할 수 없는 경우 사용자의 Discord 설치를 방해할 수 있으므로 사용하지 마십시오.\n\n확인을 눌러 이 저장소 추가를 확인하십시오."))return void goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"보안 프롬프트 거부됨"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("이 저장소는 알 수 없거나 신뢰할 수 없습니다(PGP 검증 없음). 각별히 주의하십시오. 이 저장소의 소유자를 완전히 신뢰하는지 확인하십시오.\n\n이 문제를 해결하려면 저장소 유지관리자에게 PGP 지원을 추가하도록 요청하십시오.\n\n확인을 눌러 이 저장소 추가를 다시 확인하십시오.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"보안 프롬프트 거부됨"}):goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"PGP 신뢰할 수 없으며 실패"})}},"추가")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"스토어"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"설치됨")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"새로고침",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"저장소",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"테마",confirmText:"테마 찾아보기",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"테마로 사용자의 Discord를 멋있게 꾸미기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"100개 이상의 테마 중에서 선택하여 사용자 인터페이스를 조정하고 향상시키십시오"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"플러그인",confirmText:"플러그인 찾아보기",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discord 앱의 기능을 확장할 수 있습니다"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"플러그인은 앱 자체의 개선으로 사용자의 경험을 향상시킵니다"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"스토어",confirmText:"홈 화면에서 스토어 보기",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"스토어에서 테마 및 플러그인 찾아보기"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod는 여러분이 쉽게 둘러보고 설치할 수 있는 자체 스토어를 사용합니다"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"설정",confirmText:"GooseMod 설정 보기",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-설정-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"실험적 기능",description:"새로운 실험적 기능 체험하기"},{name:"유틸리티",description:"백업 만들기, GooseMod 재설정 등"},{name:"트윅",description:"GooseMod를 원하는 방식으로 트윅"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"기능을 사용자 정의하기 위한 GooseMod의 설정 사용"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"변경할 수 있는 다양한 옵션이 있습니다"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"커뮤니티",confirmText:"GooseMod Discord 가입하기",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"질문하기",description:"질문하고 지원 받기"},{name:"소식",description:"GooseMod 및 관련 프로젝트에 대한 최신 소식 및 공지 사항 받기"},{name:"참여하기",description:"제안에 대한 도움, 다른 사람 지원, 기타 드등"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod의 커뮤니티 가입하기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"더 많은 정보를 원하시면 Discord에 가입하세요"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"더 알아보기",cancelText:"관심 없음",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"스토어",description:"GooseMod의 스토어 및 그 내용에 대해 알아보기"},{name:"설정",description:"GooseMod 및 플러그인 설정 알아보기"},{name:"커뮤니티",description:"Discord에 가입하여 질문하고, 피드백을 제공하고, 최신 소식을 받아보세요"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod에 대해 알아보기"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseMod의 핵심 기능에 대해 짧게 둘러보기"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"플러그인"===e[1])),themes:e.settings.items.find((e=>"테마"===e[1])),snippets:e.settings.items.find((e=>"스니펫"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"테마"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("테마","themes"),id:"gm-home-themes",text:"테마",selected:!1})),c(t.createElement(a,{style:{display:S||"플러그인"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("플러그인","plugins"),id:"gm-home-plugins",text:"플러그인",selected:!1})),k?c(t.createElement(a,{style:{display:S||"스니펫"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("스니펫","snippets"),id:"gm-home-snippets",text:"스니펫",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"스니펫"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"제거":"추가",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="추가",s.buttonText="추가",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="제거",s.buttonText="제거",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"설정":o="settings";break;case"플러그인":o="plugins";break;case"테마":o="themes";break;case"스니펫":o="snippets";break;case"변경 사항":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("설정"),t?void 0:o("플러그인"),t?void 0:o("테마"),o("변경 사항")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 모듈",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 모듈"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("플러그인"===e[1]||"테마"===e[1]||"스니펫"===e[1])||!t.snippets&&"스니펫"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"설정":o="settings";break;case"플러그인":o="plugins";break;case"테마":o="themes";break;case"스니펫":o="snippets";break;case"변경 사항":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"플러그인"!==t[1]&&"테마"!==t[1]&&"스니펫"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"플러그인"!==e.target.textContent&&"테마"!==e.target.textContent&&"스니펫"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","변경 사항",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 모듈"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("새로고침","새로 고침 필요","이 설정을 적용하려면 새로 고침이 필요합니다**. 새로 고침하기 전에이 세션에서 이상한 행동 **이 발생할 수 있습니다.")&&location.reload()};e.settings.createItem("설정",["",{type:"header",text:"설정"},{type:"toggle",text:"GooseMod 변경 로그",subtext:"GooseMod \"변경 로그\" 설정 표시",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"메인 구분자",subtext:"메인 GooseMod 설정 사이에 구분자 표시",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"홈 화면의 스토어",subtext:"설정 대신 홈에 GooseMod 스토어 옵션 넣기",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"스토어"},{type:"toggle",text:"자동 업데이트",subtext:"매시간 자동으로 저장소 및 모듈 업데이트",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"새 모듈 알림",subtext:"스토어에 새 모듈이 추가될 때마다 알림을 표시합니다.",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"외관"},{type:"toggle",text:"GooseMod 배지",subtext:"GooseMod의 배지 표시",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"유틸리티"},{type:"text-and-button",text:"캐시 지우기",subtext:"GooseMod가 사용하는 캐시 지우기 (완전히 제거)",buttonText:"지우기",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"둘러보기 시작",subtext:"GooseMod의 둘러보기 시작하기 다시 살펴보기",buttonText:"둘러보기",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"디버그 정보 복사",subtext:"보고 및 디버깅을 위해 설정 및 GooseMod에 대한 정보를 복사합니다",buttonText:"복사하기",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod 재설정",subtext:"GooseMod완전히 재설정: 모든 기본 설정과 모듈을 제거합니다. 처음 설치하는 것처럼",buttonText:"재설정",onclick:async()=>{await e.confirmDialog("재설정","구스 모드 재설정","확인하면 GooseMod가 완전히 재설정되어 모든 환경 설정과 모듈이 제거됩니다. 마치 구스 모드 (GooseMod)를 처음 설치 한 것처럼. 이것은 돌이킬 수 없습니다.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"백업"},{type:"text-and-button",text:"백업 만들기",subtext:"GooseMod 모듈 및 설정을 백업하기위한 파일 만들기",buttonText:"백업",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"백업 복원하기",subtext:"백업 파일을 통해 사용자의 GooseMod 모듈 및 설정을 복원하고, **신뢰할 수 있는 백업만 복원**합니다",buttonText:"복원하기",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"변경",collapsed:!0,collapseOffset:1},{type:"subtext",text:"작은 UI 변경과 같은 사소한 변경으로 GooseMod를 원하는 대로 만들 수 있습니다"},{type:"toggle",text:"자리표시자 이미지",subtext:"이미지가 없는 모듈의 경우 스토어에서 자리표시자 이미지 사용",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"접을 수 있는 홈 범주",subtext:"아이콘을 통해 홈 범주를 접을 수 있도록 합니다",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"실험적",collapsed:!0,collapseOffset:1},{type:"subtext",text:"실험적 설정은 불완전하고 불안정하여, 경험의 감소로 이어질 수 있습니다"},{type:"toggle",experimental:!0,text:"데이터 속성",subtext:"사용할 일부 테마에 대해 일부 요소에 데이터 속성 추가하기",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"스니펫",subtext:"스토어에서 스니펫 탭 활성화",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"강제 테마 설정",subtext:"모든 테마에 대해 강제 자동 생성 설정",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="별점",i="모두",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"스토어":"설치됨";switch(r){case"A-Z순":t.style.order="";break;case"마지막 업데이트":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"별점":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"스토어"!==n&&n!==p||"모두"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"스토어";"스토어"!==n&&"설치됨"!==n&&(n="스토어"),o.forEach(t);const a=""===d&&"스토어"===n&&"모두"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"검색된 결과가 없습니다."!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="검색된 결과가 없습니다.",""!==d&&"스토어"===n&&"모두"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="검색된 결과가 없습니다. 플러그인을 찾으시는 건가요?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="검색된 결과가 없습니다. 테마를 찾으시는 건가요?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"모든 테마"!==c.textContent&&"모든 플러그인"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["플러그인","테마"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"플러그인 검색":"테마 검색",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"정렬 기준",options:["별점","A-Z순","마지막 업데이트"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"작성자",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("모두"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"최고 별점",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"최근 업데이트됨",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"모든 플러그인":"모든 테마"},{type:"gm-footer"}]))),e.settings.createItem("스니펫",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("변경 사항",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 모듈"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"플러그인"===e||"테마"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"테마":"플러그인",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 스토어"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 스토어"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 스토어"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 스토어"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="제거",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="설치",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"플러그인"===e[1]||"테마"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"제거":"설치",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 후원자","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 번역자","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 개발자","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 공식 Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="제거"===this.props.buttonText?"설치":"제거",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"테마"===e[1]))[2],d=goosemod.settings.items.find((e=>"플러그인"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 모듈")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"링크 열기"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"제거"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP 검증됨",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP 신뢰할 수 없음",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP 없음",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"저장소"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("잘못된 저장소",{type:"error",timeout:5e3,subtext:"잘못된 형식"});if(!confirm("외부 저장소는 GooseMod 개발자가 제어하지 않기 때문에 보안 위험이 있습니다. 사용자가 추가한 외부 저장소로 인한 위험에 대해서는 책임지지 않습니다.\n\n이 저장소의 소유자를 신뢰할 수 없는 경우 사용자의 Discord 설치를 방해할 수 있으므로 사용하지 마십시오.\n\n확인을 눌러 이 저장소 추가를 확인하십시오."))return void goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"보안 프롬프트 거부됨"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("이 저장소는 알 수 없거나 신뢰할 수 없습니다(PGP 검증 없음). 각별히 주의하십시오. 이 저장소의 소유자를 완전히 신뢰하는지 확인하십시오.\n\n이 문제를 해결하려면 저장소 유지관리자에게 PGP 지원을 추가하도록 요청하십시오.\n\n확인을 눌러 이 저장소 추가를 다시 확인하십시오.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"보안 프롬프트 거부됨"}):goosemod.showToast("저장소 추가 중 취소됨",{type:"danger",timeout:5e3,subtext:"PGP 신뢰할 수 없으며 실패"})}},"추가")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"스토어"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"설치됨")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"새로고침",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"저장소",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.lt.js b/goosemod.lt.js index 1e2076b9..d8482e53 100644 --- a/goosemod.lt.js +++ b/goosemod.lt.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temos",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Papildiniai",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Parduotuvė",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nustatymai",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nustatymai-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Bendruomenė",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Parduotuvė",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Nustatymai",description:"Find out about the settings for GooseMod and plugins"},{name:"Bendruomenė",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Papildiniai"===e[1])),themes:e.settings.items.find((e=>"Temos"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temos","themes"),id:"gm-home-themes",text:"Temos",selected:!1})),c(t.createElement(a,{style:{display:S||"Papildiniai"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Papildiniai","plugins"),id:"gm-home-plugins",text:"Papildiniai",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Pašalinti":"Pridėti",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Pridėti",s.buttonText="Pridėti",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Pašalinti",s.buttonText="Pašalinti",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nustatymai":o="settings";break;case"Papildiniai":o="plugins";break;case"Temos":o="themes";break;case"Snippets":o="snippets";break;case"Pakeitimų žurnalas":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nustatymai"),t?void 0:o("Papildiniai"),t?void 0:o("Temos"),o("Pakeitimų žurnalas")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduliai",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduliai"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Papildiniai"===e[1]||"Temos"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nustatymai":o="settings";break;case"Papildiniai":o="plugins";break;case"Temos":o="themes";break;case"Snippets":o="snippets";break;case"Pakeitimų žurnalas":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Papildiniai"!==t[1]&&"Temos"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Papildiniai"!==e.target.textContent&&"Temos"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Pakeitimų žurnalas",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduliai"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Nustatymai",["",{type:"header",text:"Nustatymai"},{type:"toggle",text:"GooseMod Pakeitimų žurnalas",subtext:"Rodyti GooseMod \"Pakeitimų žurnalas\" nustatymą",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Parduotuvė"},{type:"toggle",text:"Automatinis atnaujinimas",subtext:"Automatinis saugyklų ir modulių atnaujinimas kas valandą",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Išvaizda"},{type:"toggle",text:"GooseMod ženkliukai",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Komunalinės paslaugos"},{type:"text-and-button",text:"Purge Caches",subtext:"Išvalo (visiškai pašalina) daugumą talpyklų \"GooseMod\" naudoja",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Ekskursija",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Atsarginė kopija"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentinis",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Tikėtina, kad eksperimentinė aplinka bus neišbaigta ir nestabili, todėl patirtis bus prastesnė."},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Žvaigždės",i="Visi",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Paskutinį kartą atnaujinta":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Žvaigždės":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"Visi"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"Visi"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Rezultatų nerasta"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Rezultatų nerasta",""!==d&&"Store"===n&&"Visi"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Rezultatų nerasta, ar turėjote omenyje įskiepius?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"Visi įskiepiai"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Papildiniai","Temos"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Paieškos įskiepis":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Rūšiuoti pagal",options:["Žvaigždės","A-Z","Paskutinį kartą atnaujinta"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autorius",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Visi"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Neseniai atnaujinta",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Visi įskiepiai":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Pakeitimų žurnalas",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduliai"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Papildiniai"===e||"Temos"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temos":"Papildiniai",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod parduotuvė"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod parduotuvė"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod parduotuvė"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod parduotuvė"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Pašalinti",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Įdiekite",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Papildiniai"===e[1]||"Temos"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Pašalinti":"Įdiekite",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Pašalinti"===this.props.buttonText?"Įdiekite":"Pašalinti",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temos"===e[1]))[2],d=goosemod.settings.items.find((e=>"Papildiniai"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduliai")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Atidaryti nuorodą"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Pašalinti"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Nėra PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Saugykla"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External storage is a security risk because it is not under the control of GooseMod developers. We are not responsible for the risks caused by external repositories added by users.\n\nIf you do not trust the owner of this repository, do not use it, as it may harm your Discord installation.\n\nConfirm that you have added this repo by clicking OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Pridėti")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Atnaujinti",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Saugykla",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temos",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Papildiniai",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Parduotuvė",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nustatymai",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nustatymai-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilities",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Bendruomenė",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"News",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Learn More",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Parduotuvė",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Nustatymai",description:"Find out about the settings for GooseMod and plugins"},{name:"Bendruomenė",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Papildiniai"===e[1])),themes:e.settings.items.find((e=>"Temos"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temos","themes"),id:"gm-home-themes",text:"Temos",selected:!1})),c(t.createElement(a,{style:{display:S||"Papildiniai"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Papildiniai","plugins"),id:"gm-home-plugins",text:"Papildiniai",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Pašalinti":"Pridėti",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Pridėti",s.buttonText="Pridėti",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Pašalinti",s.buttonText="Pašalinti",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nustatymai":o="settings";break;case"Papildiniai":o="plugins";break;case"Temos":o="themes";break;case"Snippets":o="snippets";break;case"Pakeitimų žurnalas":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nustatymai"),t?void 0:o("Papildiniai"),t?void 0:o("Temos"),o("Pakeitimų žurnalas")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduliai",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduliai"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Papildiniai"===e[1]||"Temos"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nustatymai":o="settings";break;case"Papildiniai":o="plugins";break;case"Temos":o="themes";break;case"Snippets":o="snippets";break;case"Pakeitimų žurnalas":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Papildiniai"!==t[1]&&"Temos"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Papildiniai"!==e.target.textContent&&"Temos"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Pakeitimų žurnalas",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduliai"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Nustatymai",["",{type:"header",text:"Nustatymai"},{type:"toggle",text:"GooseMod Pakeitimų žurnalas",subtext:"Rodyti GooseMod \"Pakeitimų žurnalas\" nustatymą",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Parduotuvė"},{type:"toggle",text:"Automatinis atnaujinimas",subtext:"Automatinis saugyklų ir modulių atnaujinimas kas valandą",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Išvaizda"},{type:"toggle",text:"GooseMod ženkliukai",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Komunalinės paslaugos"},{type:"text-and-button",text:"Purge Caches",subtext:"Išvalo (visiškai pašalina) daugumą talpyklų \"GooseMod\" naudoja",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Ekskursija",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copy Debug Info",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copy",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Atsarginė kopija"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentinis",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Tikėtina, kad eksperimentinė aplinka bus neišbaigta ir nestabili, todėl patirtis bus prastesnė."},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Force Theme Settings",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Žvaigždės",i="Visi",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Store":"Installed";switch(r){case"A-Z":t.style.order="";break;case"Paskutinį kartą atnaujinta":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Žvaigždės":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Store"!==n&&n!==p||"Visi"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Store";"Store"!==n&&"Installed"!==n&&(n="Store"),o.forEach(t);const a=""===d&&"Store"===n&&"Visi"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Rezultatų nerasta"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Rezultatų nerasta",""!==d&&"Store"===n&&"Visi"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Rezultatų nerasta, ar turėjote omenyje įskiepius?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="No results found, did you mean themes?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"All Themes"!==c.textContent&&"Visi įskiepiai"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Papildiniai","Temos"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Paieškos įskiepis":"Search Themes",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Rūšiuoti pagal",options:["Žvaigždės","A-Z","Paskutinį kartą atnaujinta"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autorius",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Visi"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Neseniai atnaujinta",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Visi įskiepiai":"All Themes"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Pakeitimų žurnalas",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduliai"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Papildiniai"===e||"Temos"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temos":"Papildiniai",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod parduotuvė"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod parduotuvė"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod parduotuvė"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod parduotuvė"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Pašalinti",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Įdiekite",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Papildiniai"===e[1]||"Temos"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Pašalinti":"Įdiekite",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Translator","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Pašalinti"===this.props.buttonText?"Įdiekite":"Pašalinti",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temos"===e[1]))[2],d=goosemod.settings.items.find((e=>"Papildiniai"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduliai")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Atidaryti nuorodą"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Pašalinti"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verified",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Untrusted",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Nėra PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Saugykla"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Invalid Format"});if(!confirm("External storage is a security risk because it is not under the control of GooseMod developers. We are not responsible for the risks caused by external repositories added by users.\n\nIf you do not trust the owner of this repository, do not use it, as it may harm your Discord installation.\n\nConfirm that you have added this repo by clicking OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Pridėti")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Store"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installed")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Atnaujinti",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Saugykla",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.nl.js b/goosemod.nl.js index 83415ba2..b2f9c439 100644 --- a/goosemod.nl.js +++ b/goosemod.nl.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themas",confirmText:"Blader door Thema\'s",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verfraai je Discord met Thema\'s"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Selecteer van over 100 thema\'s om je gebruikersinterface uit te breiden en te verfraaien"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Blader door Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Versterk je Discord onder de motorkap"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins vergroten je ervaring met verbeteringen in de app zelf"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Winkel",confirmText:"Bekijk Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Blader door Thema\'s en Plugins in de Winkel"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod gebruikt zijn eigen Winkel, waar je makelijk rond kan kijken en installeren"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Instellingen",confirmText:"Bekijk GooseMod\'s Instellingen",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Instellingen-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentele Functies",description:"Probeer nieuwe experimentele functies"},{name:"Voorzieningen",description:"Maak backups, reset GooseMod, en meer"},{name:"Tweaks",description:"Pas GooseMod aan naar jou wens"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Gebruik GooseMod\'s instellingen om de functies aan te passen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Er zijn verschillende opties die je kan veranderen"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Word lid van GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Stel Vragen",description:"Stel vragen en krijg support"},{name:"Nieuws",description:"Krijg het laatste nieuws en aankondigingen over GooseMod en gerelateerde projecten"},{name:"Raak Betrokken",description:"Help mee met suggesties, anderen supporten, en meer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Word lid van GooseMod\'s community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Word lid van onze Discord voor meer informatie en meer"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Leer Meer",cancelText:"Niet Geïnteresseerd",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Winkel",description:"Leer over GooseMod\'s Winkel en wat er in te vinden is"},{name:"Instellingen",description:"Lees meer over de instellingen voor GooseMod en plugins"},{name:"Community",description:"Word lid van onze Discord om vragen te stellen, feedback te geven, up to date te blijven met nieuws, en meer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Leer over GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ga door een korte tour door GooseMod\'s kernfuncties"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themas"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themas","themes"),id:"gm-home-themes",text:"Themas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Verwijderen":"Toevoegen",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Toevoegen",s.buttonText="Toevoegen",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Verwijderen",s.buttonText="Verwijderen",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Instellingen":o="settings";break;case"Plugins":o="plugins";break;case"Themas":o="themes";break;case"Snippets":o="snippets";break;case"Wijzigingslog":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Instellingen"),t?void 0:o("Plugins"),t?void 0:o("Themas"),o("Wijzigingslog")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themas"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Instellingen":o="settings";break;case"Plugins":o="plugins";break;case"Themas":o="themes";break;case"Snippets":o="snippets";break;case"Wijzigingslog":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themas"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themas"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Wijzigingslog",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Herlaad","Opnieuw Laden Vereist","Deze instelling **vereist het opnieuw laden van Discord.** Je **kan wat vreemd gedrag ervaren** in deze sessie voor de herlaad.")&&location.reload()};e.settings.createItem("Instellingen",["",{type:"header",text:"Instellingen"},{type:"toggle",text:"GooseMod Wijzigingslog",subtext:"GooseMod \"Veranderingslog\" optie weergeven",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hoofdverdelers",subtext:"Toon verdelers tussen GooseMod hoofdinstellingen",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store in Home",subtext:"Zet GooseMod Store opties in home in plaats van instellingen",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Winkel"},{type:"toggle",text:"Automatisch Updaten",subtext:"Repo\'s en module\'s elk uur automatisch updaten",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Nieuwe Module Berichtgeving",subtext:"Laat een popup zien als er een nieuwe module is toegevoegd aan de winkel",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Uiterlijk"},{type:"toggle",text:"GooseMod Badges",subtext:"Laat GooseMod\'s badges zien",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Nutsvoorzieningen"},{type:"text-and-button",text:"Caches Verwijderen",subtext:"Verwijdert meeste caches die GooseMod gebruikt",buttonText:"Verwijder",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Doorloop GooseMod\'s opstarttour opnieuw",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopieer Debug Info",subtext:"Kopieert informatie over de setup en GooseMod voor reporteren en debuggen",buttonText:"Kopieer",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"GooseMod compleet resetten: verwijdert alle voorkeuren en modules; alsof het een eerste installatie is",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Bevestigen zal GooseMod volledig resetten en alle voorkeuren en modules verwijderen; alsof je GooseMod voor de eerste keer hebt geïnstalleerd. Dit is onomkeerbaar.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Backup Maken",subtext:"Maakt een bestand voor GooseMod modules en instellingen te backuppen",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Backup Herstellen",subtext:"Herstel je GooseMod modules en instellingen via een backup bestand, **herstel alleen backups die je vertrouwt**",buttonText:"Herstel",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Aanpassingen",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kleine veranderingen aan bijvoorbeeld de gebruikersinterface om GooseMod te maken zoals jij het wilt"},{type:"toggle",text:"Plaatsvervangende afbeelding",subtext:"Gebruik een plaatsvervangende afbeelding in de Winkel voor modules zonder foto\'s",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Opvouwbare Home Categorie",subtext:"Maak de Home categorie opvouwbaar via icoon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimenteel",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentele instellingen zijn waarschijnlijk niet compleet en onstabiel, wat kan resulteren in een verslechterde ervaring"},{type:"toggle",experimental:!0,text:"Data Attributen",subtext:"Voeg data attributen toe aan elementen voor gebruik in bepaalde thema\'s",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Zet Snippets tablad aan in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forceer Thema Instellingen",subtext:"Forceer automatisch gegenereerde instellingen voor alle thema\'s",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Sterren",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Winkel":"Geïnstalleerd";switch(r){case"A-Z":t.style.order="";break;case"Laatst Geupdate":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Sterren":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Winkel"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Winkel";"Winkel"!==n&&"Geïnstalleerd"!==n&&(n="Winkel"),o.forEach(t);const a=""===d&&"Winkel"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Geen resultaat gevonden"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Geen resultaat gevonden",""!==d&&"Winkel"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Geen resultaat gevonden, bedoelde je plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Geen resultaat gevonden, bedoelde je thema\'s?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Thema\'s"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Zoek Plugins":"Zoek Themas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorteer op",options:["Sterren","A-Z","Laatst Geupdate"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Auteur",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Meeste Sterren",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recent Geupdate",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Thema\'s"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Wijzigingslog",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Winkel"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Winkel"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Winkel"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Winkel"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Verwijderen",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installeer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Verwijderen":"Installeer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Vertaler","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Officiële Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Verwijderen"===this.props.buttonText?"Installeer":"Verwijderen",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Verwijderen"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Geverifieerd",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Onvertrouwd",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Geen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repo\'s"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ongeldige repo",{type:"error",timeout:5e3,subtext:"Ongeldig formaat"});if(!confirm("Externe repo\'s kunnen beveiligingsrisicos hebben omdat ze niet gecontrolleerd worden door de GooseMod ontwikkelaars. We zijn niet verantwoordelijk voor schade door externe repos die toegevoegd werden door gebruikers.\n\nAls je de beheerder van de repo niet vertrouwd, gebruik de repo dan niet want hij zou je Discord installatie kunnen compromiseren.\n\nBevestig dat je deze repo wilt toevoegen door op OK te duwen."))return void goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Beveiligingsprompt afgewezen"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Deze repo is niet gekent of vertrouwd (geen PGP verificatie), ben extra voorzightig. Zorg ervoor dat je de owner(s) van deze repo voledig vertrouwd.\n\nOm dit probleem op te lossen, vraag de repo owner om PGP support toe te voegen.\n\nConfirmeer opniew om deze repo toe te voegen door op OK te duwen.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Beveiligingsprompt afgewezen"}):goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Onvertrouwde PGP mislukking"})}},"Toevoegen")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Winkel"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Geïnstalleerd")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Herlaad",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repo\'s",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Themas",confirmText:"Blader door Thema\'s",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Verfraai je Discord met Thema\'s"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Selecteer van over 100 thema\'s om je gebruikersinterface uit te breiden en te verfraaien"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Blader door Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Versterk je Discord onder de motorkap"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins vergroten je ervaring met verbeteringen in de app zelf"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Winkel",confirmText:"Bekijk Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Blader door Thema\'s en Plugins in de Winkel"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod gebruikt zijn eigen Winkel, waar je makelijk rond kan kijken en installeren"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Instellingen",confirmText:"Bekijk GooseMod\'s Instellingen",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Instellingen-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentele Functies",description:"Probeer nieuwe experimentele functies"},{name:"Voorzieningen",description:"Maak backups, reset GooseMod, en meer"},{name:"Tweaks",description:"Pas GooseMod aan naar jou wens"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Gebruik GooseMod\'s instellingen om de functies aan te passen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Er zijn verschillende opties die je kan veranderen"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Community",confirmText:"Word lid van GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Stel Vragen",description:"Stel vragen en krijg support"},{name:"Nieuws",description:"Krijg het laatste nieuws en aankondigingen over GooseMod en gerelateerde projecten"},{name:"Raak Betrokken",description:"Help mee met suggesties, anderen supporten, en meer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Word lid van GooseMod\'s community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Word lid van onze Discord voor meer informatie en meer"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Leer Meer",cancelText:"Niet Geïnteresseerd",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Winkel",description:"Leer over GooseMod\'s Winkel en wat er in te vinden is"},{name:"Instellingen",description:"Lees meer over de instellingen voor GooseMod en plugins"},{name:"Community",description:"Word lid van onze Discord om vragen te stellen, feedback te geven, up to date te blijven met nieuws, en meer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Leer over GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ga door een korte tour door GooseMod\'s kernfuncties"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Themas"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Themas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Themas","themes"),id:"gm-home-themes",text:"Themas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Verwijderen":"Toevoegen",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Toevoegen",s.buttonText="Toevoegen",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Verwijderen",s.buttonText="Verwijderen",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Instellingen":o="settings";break;case"Plugins":o="plugins";break;case"Themas":o="themes";break;case"Snippets":o="snippets";break;case"Wijzigingslog":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Instellingen"),t?void 0:o("Plugins"),t?void 0:o("Themas"),o("Wijzigingslog")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modules",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modules"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Themas"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Instellingen":o="settings";break;case"Plugins":o="plugins";break;case"Themas":o="themes";break;case"Snippets":o="snippets";break;case"Wijzigingslog":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Themas"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Themas"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Wijzigingslog",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modules"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Herlaad","Opnieuw Laden Vereist","Deze instelling **vereist het opnieuw laden van Discord.** Je **kan wat vreemd gedrag ervaren** in deze sessie voor de herlaad.")&&location.reload()};e.settings.createItem("Instellingen",["",{type:"header",text:"Instellingen"},{type:"toggle",text:"GooseMod Wijzigingslog",subtext:"GooseMod \"Veranderingslog\" optie weergeven",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hoofdverdelers",subtext:"Toon verdelers tussen GooseMod hoofdinstellingen",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store in Home",subtext:"Zet GooseMod Store opties in home in plaats van instellingen",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Winkel"},{type:"toggle",text:"Automatisch Updaten",subtext:"Repo\'s en module\'s elk uur automatisch updaten",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Nieuwe Module Berichtgeving",subtext:"Laat een popup zien als er een nieuwe module is toegevoegd aan de winkel",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Uiterlijk"},{type:"toggle",text:"GooseMod Badges",subtext:"Laat GooseMod\'s badges zien",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Nutsvoorzieningen"},{type:"text-and-button",text:"Caches Verwijderen",subtext:"Verwijdert meeste caches die GooseMod gebruikt",buttonText:"Verwijder",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Doorloop GooseMod\'s opstarttour opnieuw",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopieer Debug Info",subtext:"Kopieert informatie over de setup en GooseMod voor reporteren en debuggen",buttonText:"Kopieer",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Reset GooseMod",subtext:"GooseMod compleet resetten: verwijdert alle voorkeuren en modules; alsof het een eerste installatie is",buttonText:"Reset",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Bevestigen zal GooseMod volledig resetten en alle voorkeuren en modules verwijderen; alsof je GooseMod voor de eerste keer hebt geïnstalleerd. Dit is onomkeerbaar.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Backup Maken",subtext:"Maakt een bestand voor GooseMod modules en instellingen te backuppen",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Backup Herstellen",subtext:"Herstel je GooseMod modules en instellingen via een backup bestand, **herstel alleen backups die je vertrouwt**",buttonText:"Herstel",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Aanpassingen",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Kleine veranderingen aan bijvoorbeeld de gebruikersinterface om GooseMod te maken zoals jij het wilt"},{type:"toggle",text:"Plaatsvervangende afbeelding",subtext:"Gebruik een plaatsvervangende afbeelding in de Winkel voor modules zonder foto\'s",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Opvouwbare Home Categorie",subtext:"Maak de Home categorie opvouwbaar via icoon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimenteel",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentele instellingen zijn waarschijnlijk niet compleet en onstabiel, wat kan resulteren in een verslechterde ervaring"},{type:"toggle",experimental:!0,text:"Data Attributen",subtext:"Voeg data attributen toe aan elementen voor gebruik in bepaalde thema\'s",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Zet Snippets tablad aan in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forceer Thema Instellingen",subtext:"Forceer automatisch gegenereerde instellingen voor alle thema\'s",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Sterren",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Winkel":"Geïnstalleerd";switch(r){case"A-Z":t.style.order="";break;case"Laatst Geupdate":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Sterren":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Winkel"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Winkel";"Winkel"!==n&&"Geïnstalleerd"!==n&&(n="Winkel"),o.forEach(t);const a=""===d&&"Winkel"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Geen resultaat gevonden"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Geen resultaat gevonden",""!==d&&"Winkel"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Geen resultaat gevonden, bedoelde je plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Geen resultaat gevonden, bedoelde je thema\'s?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle Thema\'s"!==c.textContent&&"Alle Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Themas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Zoek Plugins":"Zoek Themas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorteer op",options:["Sterren","A-Z","Laatst Geupdate"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Auteur",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Meeste Sterren",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recent Geupdate",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle Plugins":"Alle Thema\'s"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Wijzigingslog",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modules"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Themas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Themas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Winkel"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Winkel"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Winkel"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Winkel"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Verwijderen",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installeer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Themas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Verwijderen":"Installeer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Vertaler","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Developer","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Officiële Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Verwijderen"===this.props.buttonText?"Installeer":"Verwijderen",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Themas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modules")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Verwijderen"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Geverifieerd",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Onvertrouwd",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Geen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repo\'s"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ongeldige repo",{type:"error",timeout:5e3,subtext:"Ongeldig formaat"});if(!confirm("Externe repo\'s kunnen beveiligingsrisicos hebben omdat ze niet gecontrolleerd worden door de GooseMod ontwikkelaars. We zijn niet verantwoordelijk voor schade door externe repos die toegevoegd werden door gebruikers.\n\nAls je de beheerder van de repo niet vertrouwd, gebruik de repo dan niet want hij zou je Discord installatie kunnen compromiseren.\n\nBevestig dat je deze repo wilt toevoegen door op OK te duwen."))return void goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Beveiligingsprompt afgewezen"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Deze repo is niet gekent of vertrouwd (geen PGP verificatie), ben extra voorzightig. Zorg ervoor dat je de owner(s) van deze repo voledig vertrouwd.\n\nOm dit probleem op te lossen, vraag de repo owner om PGP support toe te voegen.\n\nConfirmeer opniew om deze repo toe te voegen door op OK te duwen.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Beveiligingsprompt afgewezen"}):goosemod.showToast("Repo toevoegen geannuleerd",{type:"danger",timeout:5e3,subtext:"Onvertrouwde PGP mislukking"})}},"Toevoegen")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Winkel"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Geïnstalleerd")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Herlaad",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repo\'s",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.no.js b/goosemod.no.js index 9df70747..9457276e 100644 --- a/goosemod.no.js +++ b/goosemod.no.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Drakter",confirmText:"Utforsk drakter",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ikle din Discord fine drakter"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Velg blandt over 100 drakter for å tilpasse og forbedre ditt brukergrensesnitt"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Programtillegg",confirmText:"Utforsk programtillegg",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Finjuster din Discord under panseret"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Programtillegg endrer opplevelsen, og forbedrer selve programmet"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butikk",confirmText:"Vis butikk på hjemmeskjerm",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Utforsk drakter og programtillegg i butikk"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod bruker sin egen butikk, der du enkelt kan utforske og installere"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Innstillinger",confirmText:"Vis innstillingene i GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Innstillinger-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Eksperimentelle funksjoner",description:"Prøv nye eksperimentelle funksjoner"},{name:"Verktøy",description:"Lag sikkerhetskopier, tilbakestill GooseMod, og annet"},{name:"Tilpasninger",description:"Sett opp GooseMod akkurat slik du vil ha det"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Bruk innstillinger i GooseMod for å tilpasse dets funksjoner"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Det er forskjellige ting du kan endre på"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemenskap",confirmText:"Ta del I GooseMod-Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Still spørsmål",description:"Still de spørsmålene du ønsker og få støtte"},{name:"Nyheter",description:"Få siste nytt og kunngjøringer om GooseMod og relaterte prosjekter"},{name:"Involver deg",description:"Hjelp til med forslag, støtt andre, og mye annet"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ta del i GooseMod-gemenskapen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ta del i vår Discord for mer info og andre ting"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Lær mer",cancelText:"Ikke interessert",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butikk",description:"Lær om GooseMod sin butikk og hva som er i den"},{name:"Innstillinger",description:"Finn ut mer om innstillingene i GooseMod og dets programtillegg"},{name:"Gemenskap",description:"Ta del i vår Discord for å stille spørsmål, gi tilbakemeldinger, sjekke hva som er nytt, med mer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Lær om GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Gå gjennom en kort veiledning i GooseMod sin kjernefunksjonalitet"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Programtillegg"===e[1])),themes:e.settings.items.find((e=>"Drakter"===e[1])),snippets:e.settings.items.find((e=>"Snutter"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Drakter"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Drakter","themes"),id:"gm-home-themes",text:"Drakter",selected:!1})),c(t.createElement(a,{style:{display:S||"Programtillegg"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Programtillegg","plugins"),id:"gm-home-plugins",text:"Programtillegg",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snutter"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snutter","snippets"),id:"gm-home-snippets",text:"Snutter",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snutter"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Fjern":"Legg til",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Legg til",s.buttonText="Legg til",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Fjern",s.buttonText="Fjern",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Innstillinger":o="settings";break;case"Programtillegg":o="plugins";break;case"Drakter":o="themes";break;case"Snutter":o="snippets";break;case"Endringslogg":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Innstillinger"),t?void 0:o("Programtillegg"),t?void 0:o("Drakter"),o("Endringslogg")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod-moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod-moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Programtillegg"===e[1]||"Drakter"===e[1]||"Snutter"===e[1])||!t.snippets&&"Snutter"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Innstillinger":o="settings";break;case"Programtillegg":o="plugins";break;case"Drakter":o="themes";break;case"Snutter":o="snippets";break;case"Endringslogg":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Programtillegg"!==t[1]&&"Drakter"!==t[1]&&"Snutter"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Programtillegg"!==e.target.textContent&&"Drakter"!==e.target.textContent&&"Snutter"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Endringslogg",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod-moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Gjenoppfrisk","Gjenoppfrisking kreves","Du må **gjenoppfriske for at dette programtillegget skal kunne brukes** Det **kan** hende ting blir rare i denne økten før du gjenoppfrisker.")&&location.reload()};e.settings.createItem("Innstillinger",["",{type:"header",text:"Innstillinger"},{type:"toggle",text:"GooseMod-endringslogg",subtext:"Vis «Endringslogg»-innstilling",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hovedinndelere",subtext:"Vis inndelere mellom hoved-GooseMod-innstillinger",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butikk på hjemmeskjerm",subtext:"Vis GoosMod-butikkvalg på hjemmeskjermen istedenfor i innsntillinger",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butikk"},{type:"toggle",text:"Automatisk oppdatering",subtext:"Oppdater kodelagre og moduler hver time",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Ny modulmerknader",subtext:"Viser en oppsprettsmerknad hver gang en ny modul legges til i butikken.",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Utseende"},{type:"toggle",text:"GooseMod-skilt",subtext:"Vis GooseMod-skilt",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Verktøy"},{type:"text-and-button",text:"Tøm hurtiglagre",subtext:"Tøm (fullstendig fjerning) de fleste hurtiglagrene GooseMod bruker",buttonText:"Tøm",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start veiledning",subtext:"Gå gjennom GooseMod sin oppstartsveiledning igjen",buttonText:"Veiledning",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopier avlusingsinfo",subtext:"Kopier info om oppsett og GooseMod for rapportering og avlusing.",buttonText:"Kopier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Tilbakestill GooseMod",subtext:"Tilbakestiller GooseMod fullstendig: Fjerner alle innstillinger og moduler; som for en førstegangsinstallasjon",buttonText:"Tilbakestill",onclick:async()=>{await e.confirmDialog("Tilbakestill","Tilbakestill GooseMod","Bekreftelse vil tilbakestille GooseMod fullstendig. Dette fjerner alle innstillinger og moduler, som om du installerte GooseMod for første gang. Dette kan ikke angres.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sikkerhetskopi"},{type:"text-and-button",text:"Opprett sikkerhetskopi",subtext:"Oppretter en fil for sikkerhetskopiering av dine GooseMod-moduler og innstillinger",buttonText:"Sikkerhetskopier",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Gjenopprett sikkerhetskopi",subtext:"Gjenopprett dine GooseMod-moduler og innstillinger via en sikkerhetskopifil, **kun gjenopprett sikkerhetskopier du har tiltro til**",buttonText:"Gjenopprett",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Justeringer",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Små endringer som f.eks. grensesnittsfikser for å gjøre GooseMod til ditt eget"},{type:"toggle",text:"Plassholderbilde",subtext:"Bruk et plassholderbilde i butikken hvis moduler mangler bilder",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sammenfoldbar hjemmekategori",subtext:"Tillat sammenfolding av hjemmekategorien via dens ikon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentelt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentelle innstillinger vil antagelig fremstå ufullstendige og ustabile, som kan resultere i feil"},{type:"toggle",experimental:!0,text:"Data-attributter",subtext:"Legg til dataatributter for noen elementer som drakter bruker",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snutter",subtext:"Skru på «Snutter»-fane i butikk",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Påtving draktendringer",subtext:"Påtving auto-genererte innstillinger for alle drakter",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjerner",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butikk":"Importert";switch(r){case"A-Å":t.style.order="";break;case"Sist oppdatert":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjerner":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butikk"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butikk";"Butikk"!==n&&"Importert"!==n&&(n="Butikk"),o.forEach(t);const a=""===d&&"Butikk"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Resultatløst"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Resultatløst",""!==d&&"Butikk"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Resultatløst. Mente du programtillegg?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Resultatløst. Mente du drakter?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle drakter"!==c.textContent&&"Alle programtillegg"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Programtillegg","Drakter"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Søk etter programtillegg":"Søk i drakter",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorter etter",options:["Stjerner","A-Å","Sist oppdatert"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Utvikler",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Flest stjerner",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nylig oppdatert",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle programtillegg":"Alle drakter"},{type:"gm-footer"}]))),e.settings.createItem("Snutter",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Endringslogg",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod-moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Programtillegg"===e||"Drakter"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Drakter":"Programtillegg",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod-butikken"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod-butikken"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod-butikken"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod-butikken"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Fjern",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Programtillegg"===e[1]||"Drakter"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Fjern":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod-sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod-oversetter","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod-utvikler","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Offisiell GooseMod-Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Fjern"===this.props.buttonText?"Installer":"Fjern",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Drakter"===e[1]))[2],d=goosemod.settings.items.find((e=>"Programtillegg"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod-moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Åpne lenke"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Fjern"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP bekreftet",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ubetrodd",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Kodelagre"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ugyldig kodelager",{type:"error",timeout:5e3,subtext:"Ugyldig format"});if(!confirm("Eksterne pakkebrønner medfører økt risiko, siden de ikke kontrolleres av GooseMod-utviklerne. Vi er ikke ansvarlige for noen farer som følge av at disse blir lagt til.\n\nHvis du ikke har tillit til eieren av denne pakkebrønn bør du ikke bruke det, siden det kan ta over Discord-installasjonen.\n\nBekreft at du vil legge til denne pakkebrønnen ved å trykke «OK»."))return void goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Sikkerhetsspørsmål nektet"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Denne pakkebrønnen er ikke tiltrodd (ingen PGP-bekreftelse). Vær ekstra forsiktig. Forsikre deg om at du stoler på eieren(e).\n\nFor å løse dette problemet kan du be vedlikeholderen av pakkebrønnen om å legge til PGP-støtte.\n\nBekreft at du vil legge til denne pakkebrønnen ved å trykke «OK».")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Sikkerhetsspørsmål nektet"}):goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Feil som følge av ubetrodd PGP"})}},"Legg til")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butikk"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Importert")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Gjenoppfrisk",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Kodelagre",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Drakter",confirmText:"Utforsk drakter",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ikle din Discord fine drakter"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Velg blandt over 100 drakter for å tilpasse og forbedre ditt brukergrensesnitt"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Programtillegg",confirmText:"Utforsk programtillegg",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Finjuster din Discord under panseret"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Programtillegg endrer opplevelsen, og forbedrer selve programmet"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butikk",confirmText:"Vis butikk på hjemmeskjerm",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Utforsk drakter og programtillegg i butikk"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod bruker sin egen butikk, der du enkelt kan utforske og installere"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Innstillinger",confirmText:"Vis innstillingene i GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Innstillinger-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Eksperimentelle funksjoner",description:"Prøv nye eksperimentelle funksjoner"},{name:"Verktøy",description:"Lag sikkerhetskopier, tilbakestill GooseMod, og annet"},{name:"Tilpasninger",description:"Sett opp GooseMod akkurat slik du vil ha det"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Bruk innstillinger i GooseMod for å tilpasse dets funksjoner"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Det er forskjellige ting du kan endre på"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemenskap",confirmText:"Ta del I GooseMod-Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Still spørsmål",description:"Still de spørsmålene du ønsker og få støtte"},{name:"Nyheter",description:"Få siste nytt og kunngjøringer om GooseMod og relaterte prosjekter"},{name:"Involver deg",description:"Hjelp til med forslag, støtt andre, og mye annet"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ta del i GooseMod-gemenskapen"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ta del i vår Discord for mer info og andre ting"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Lær mer",cancelText:"Ikke interessert",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butikk",description:"Lær om GooseMod sin butikk og hva som er i den"},{name:"Innstillinger",description:"Finn ut mer om innstillingene i GooseMod og dets programtillegg"},{name:"Gemenskap",description:"Ta del i vår Discord for å stille spørsmål, gi tilbakemeldinger, sjekke hva som er nytt, med mer"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Lær om GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Gå gjennom en kort veiledning i GooseMod sin kjernefunksjonalitet"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Programtillegg"===e[1])),themes:e.settings.items.find((e=>"Drakter"===e[1])),snippets:e.settings.items.find((e=>"Snutter"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Drakter"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Drakter","themes"),id:"gm-home-themes",text:"Drakter",selected:!1})),c(t.createElement(a,{style:{display:S||"Programtillegg"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Programtillegg","plugins"),id:"gm-home-plugins",text:"Programtillegg",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snutter"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snutter","snippets"),id:"gm-home-snippets",text:"Snutter",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snutter"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Fjern":"Legg til",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Legg til",s.buttonText="Legg til",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Fjern",s.buttonText="Fjern",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Innstillinger":o="settings";break;case"Programtillegg":o="plugins";break;case"Drakter":o="themes";break;case"Snutter":o="snippets";break;case"Endringslogg":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Innstillinger"),t?void 0:o("Programtillegg"),t?void 0:o("Drakter"),o("Endringslogg")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod-moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod-moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Programtillegg"===e[1]||"Drakter"===e[1]||"Snutter"===e[1])||!t.snippets&&"Snutter"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Innstillinger":o="settings";break;case"Programtillegg":o="plugins";break;case"Drakter":o="themes";break;case"Snutter":o="snippets";break;case"Endringslogg":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Programtillegg"!==t[1]&&"Drakter"!==t[1]&&"Snutter"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Programtillegg"!==e.target.textContent&&"Drakter"!==e.target.textContent&&"Snutter"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Endringslogg",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod-moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Gjenoppfrisk","Gjenoppfrisking kreves","Du må **gjenoppfriske for at dette programtillegget skal kunne brukes** Det **kan** hende ting blir rare i denne økten før du gjenoppfrisker.")&&location.reload()};e.settings.createItem("Innstillinger",["",{type:"header",text:"Innstillinger"},{type:"toggle",text:"GooseMod-endringslogg",subtext:"Vis «Endringslogg»-innstilling",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hovedinndelere",subtext:"Vis inndelere mellom hoved-GooseMod-innstillinger",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butikk på hjemmeskjerm",subtext:"Vis GoosMod-butikkvalg på hjemmeskjermen istedenfor i innsntillinger",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butikk"},{type:"toggle",text:"Automatisk oppdatering",subtext:"Oppdater kodelagre og moduler hver time",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Ny modulmerknader",subtext:"Viser en oppsprettsmerknad hver gang en ny modul legges til i butikken.",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Utseende"},{type:"toggle",text:"GooseMod-skilt",subtext:"Vis GooseMod-skilt",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Verktøy"},{type:"text-and-button",text:"Tøm hurtiglagre",subtext:"Tøm (fullstendig fjerning) de fleste hurtiglagrene GooseMod bruker",buttonText:"Tøm",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start veiledning",subtext:"Gå gjennom GooseMod sin oppstartsveiledning igjen",buttonText:"Veiledning",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopier avlusingsinfo",subtext:"Kopier info om oppsett og GooseMod for rapportering og avlusing.",buttonText:"Kopier",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Tilbakestill GooseMod",subtext:"Tilbakestiller GooseMod fullstendig: Fjerner alle innstillinger og moduler; som for en førstegangsinstallasjon",buttonText:"Tilbakestill",onclick:async()=>{await e.confirmDialog("Tilbakestill","Tilbakestill GooseMod","Bekreftelse vil tilbakestille GooseMod fullstendig. Dette fjerner alle innstillinger og moduler, som om du installerte GooseMod for første gang. Dette kan ikke angres.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sikkerhetskopi"},{type:"text-and-button",text:"Opprett sikkerhetskopi",subtext:"Oppretter en fil for sikkerhetskopiering av dine GooseMod-moduler og innstillinger",buttonText:"Sikkerhetskopier",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Gjenopprett sikkerhetskopi",subtext:"Gjenopprett dine GooseMod-moduler og innstillinger via en sikkerhetskopifil, **kun gjenopprett sikkerhetskopier du har tiltro til**",buttonText:"Gjenopprett",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Justeringer",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Små endringer som f.eks. grensesnittsfikser for å gjøre GooseMod til ditt eget"},{type:"toggle",text:"Plassholderbilde",subtext:"Bruk et plassholderbilde i butikken hvis moduler mangler bilder",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Sammenfoldbar hjemmekategori",subtext:"Tillat sammenfolding av hjemmekategorien via dens ikon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperimentelt",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperimentelle innstillinger vil antagelig fremstå ufullstendige og ustabile, som kan resultere i feil"},{type:"toggle",experimental:!0,text:"Data-attributter",subtext:"Legg til dataatributter for noen elementer som drakter bruker",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snutter",subtext:"Skru på «Snutter»-fane i butikk",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Påtving draktendringer",subtext:"Påtving auto-genererte innstillinger for alle drakter",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjerner",i="Alle",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butikk":"Importert";switch(r){case"A-Å":t.style.order="";break;case"Sist oppdatert":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjerner":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butikk"!==n&&n!==p||"Alle"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butikk";"Butikk"!==n&&"Importert"!==n&&(n="Butikk"),o.forEach(t);const a=""===d&&"Butikk"===n&&"Alle"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Resultatløst"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Resultatløst",""!==d&&"Butikk"===n&&"Alle"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Resultatløst. Mente du programtillegg?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Resultatløst. Mente du drakter?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alle drakter"!==c.textContent&&"Alle programtillegg"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Programtillegg","Drakter"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Søk etter programtillegg":"Søk i drakter",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sorter etter",options:["Stjerner","A-Å","Sist oppdatert"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Utvikler",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alle"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Flest stjerner",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nylig oppdatert",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alle programtillegg":"Alle drakter"},{type:"gm-footer"}]))),e.settings.createItem("Snutter",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Endringslogg",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod-moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Programtillegg"===e||"Drakter"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Drakter":"Programtillegg",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod-butikken"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod-butikken"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod-butikken"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod-butikken"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Fjern",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installer",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Programtillegg"===e[1]||"Drakter"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Fjern":"Installer",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod-sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod-oversetter","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod-utvikler","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Offisiell GooseMod-Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Fjern"===this.props.buttonText?"Installer":"Fjern",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Drakter"===e[1]))[2],d=goosemod.settings.items.find((e=>"Programtillegg"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod-moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Åpne lenke"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Fjern"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP bekreftet",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ubetrodd",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Kodelagre"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ugyldig kodelager",{type:"error",timeout:5e3,subtext:"Ugyldig format"});if(!confirm("Eksterne pakkebrønner medfører økt risiko, siden de ikke kontrolleres av GooseMod-utviklerne. Vi er ikke ansvarlige for noen farer som følge av at disse blir lagt til.\n\nHvis du ikke har tillit til eieren av denne pakkebrønn bør du ikke bruke det, siden det kan ta over Discord-installasjonen.\n\nBekreft at du vil legge til denne pakkebrønnen ved å trykke «OK»."))return void goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Sikkerhetsspørsmål nektet"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Denne pakkebrønnen er ikke tiltrodd (ingen PGP-bekreftelse). Vær ekstra forsiktig. Forsikre deg om at du stoler på eieren(e).\n\nFor å løse dette problemet kan du be vedlikeholderen av pakkebrønnen om å legge til PGP-støtte.\n\nBekreft at du vil legge til denne pakkebrønnen ved å trykke «OK».")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Sikkerhetsspørsmål nektet"}):goosemod.showToast("Tillegg av kodelager avbrutt",{type:"danger",timeout:5e3,subtext:"Feil som følge av ubetrodd PGP"})}},"Legg til")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butikk"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Importert")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Gjenoppfrisk",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Kodelagre",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.pl.js b/goosemod.pl.js index 4f4331b0..d1ade00a 100644 --- a/goosemod.pl.js +++ b/goosemod.pl.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Motywy",confirmText:"Przeglądaj motywy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Upiększ swojego Discorda z motywami"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Wybierz z ponad stu motywów aby zmienić oraz ulepszyć twój interfejs"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Przeglądaj Pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ulepsz swojego Discorda pod maską"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy ulepszają twoje wrażenia poprzez ulepszania w aplikacji"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Sklep",confirmText:"Pokaż sklep na stronie głównej",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Przeglądaj motywy i pluginy w sklepie"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod używa swój własny sklep gdzie możesz łatwo znaleźć różne motywy i pluginy, potem je zainstalować"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ustawienia",confirmText:"Zobacz ustawienia GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ustawienia-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funkcje eksperymentalne",description:"Wypróbuj nowe eksperymentalne funkcje"},{name:"Przydatne narzędzia",description:"Rób kopie zapasowe, resetuj GooseMod\'a i więcej"},{name:"Poprawki/ulepszenia",description:"Dopasuj GooseMod\'a do swoich upodobań"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Używaj ustawień GooseMod\'a aby spersonalizować jego funkcje"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Jest wiele opcji które możesz zmienić"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Społeczność",confirmText:"Dołącz do Discorda GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Zadawaj pytania",description:"Zadawaj pytania i otrzymuj wsparcie techniczne"},{name:"Wiadomości",description:"Otrzymaj najnowsze wiadomości i ogłoszenia na temat GooseMod\'a"},{name:"Zaangażuj się",description:"Pomóż z sugestiami, wsparciem innych itd"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Dołącz do społeczności GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Dołącz do Discorda aby otrzymywać informacje i więcej"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Dowiedz się więcej",cancelText:"Nie jestem zainteresowany/ana",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Sklep",description:"Poznaj sklep GooseMod i co on zawiera"},{name:"Ustawienia",description:"Dowiedz się o ustawienia GooseMod oraz pluginach"},{name:"Społeczność",description:"Dołącz do naszego Discorda aby zadawać pytania, zostawiać opinie, bądź na czasie z wiadomościami i więcej"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Poznaj GooseMod\'a"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Przejdź krótki poradnik aby poznać podstawowe funkcje GooseMod\'a"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Motywy"===e[1])),snippets:e.settings.items.find((e=>"Fragmenty"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Motywy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Motywy","themes"),id:"gm-home-themes",text:"Motywy",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Fragmenty"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Fragmenty","snippets"),id:"gm-home-snippets",text:"Fragmenty",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Fragmenty"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Usuń":"Dodaj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Dodaj",s.buttonText="Dodaj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Usuń",s.buttonText="Usuń",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ustawienia":o="settings";break;case"Pluginy":o="plugins";break;case"Motywy":o="themes";break;case"Fragmenty":o="snippets";break;case"Lista zmian":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ustawienia"),t?void 0:o("Pluginy"),t?void 0:o("Motywy"),o("Lista zmian")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduły GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduły GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Motywy"===e[1]||"Fragmenty"===e[1])||!t.snippets&&"Fragmenty"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ustawienia":o="settings";break;case"Pluginy":o="plugins";break;case"Motywy":o="themes";break;case"Fragmenty":o="snippets";break;case"Lista zmian":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Motywy"!==t[1]&&"Fragmenty"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Motywy"!==e.target.textContent&&"Fragmenty"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Lista zmian",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduły GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Zrestartuj","Wymagany Restart","To ustawienie **wymaga ponownego uruchomienia discorda, aby zaczęło działać**. Przed ponownym uruchomieniem **możesz doświadczyć dziwnego zachowania klienta**")&&location.reload()};e.settings.createItem("Ustawienia",["",{type:"header",text:"Ustawienia"},{type:"toggle",text:"Lista zmian GooseMod",subtext:"Pokaż ustawienie \"Lista zmian\" GooseMod\'a",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Główne seperatory",subtext:"Pokaż seperatory pomiędzy głównymi ustawieniami GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Sklep na stronie głównej",subtext:"Opcje sklepu GooseMod na stronie głównej zamiast ustawień",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Sklep"},{type:"toggle",text:"Automatyczna aktualizacja",subtext:"Automatycznie aktualizuj repozytoria i pluginy co każdą godzinę",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Powiadomienia o Nowych Pluginach",subtext:"Pokazuje powiadomienie za każdym razem, gdy nowy plugin zostanie dodany do sklepu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Wygląd"},{type:"toggle",text:"Odznaki GooseMod",subtext:"Pokazuj odznaki GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Przydatne narzędzia"},{type:"text-and-button",text:"Wyczyść pamięć podręczna",subtext:"Czyści większość pamięci podręcznej którą używa GooseMod",buttonText:"Wyczyść",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Zacznij poradnik",subtext:"Uruchom poradnik która pojawia się na pierwszym starcie",buttonText:"Poradnik",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Skopiuj informacje do debugowania",subtext:"Kopiuje informacje na temat obecnej instalacji GooseMod, użyteczne do zgłaszania błędów i debugowania",buttonText:"Kopiuj",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Zresetuj GooseMod",subtext:"Całkowicie resetuje GooseMod\'a: usuwa wszystkie preferencje, moduły; Resetuje do stanu początkowego",buttonText:"Resetuj",onclick:async()=>{await e.confirmDialog("Wyzeruj","Wyzeruj GooseMod\'a","Potwierdzenie spowoduje całkowite wyzerowanie danych GooseMod\'a. Zostaną usunięte wszystkie pluginy oraz ustawienia. Tak jakbyś zainstalował po raz pierwszy raz GooseMod\'a. Jest to nieodwracalne.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Kopie zapasowe"},{type:"text-and-button",text:"Stwórz kopie zapasową",subtext:"Tworzy kopię zapasową w formie pliku dla wszystkich modułów oraz ustawień",buttonText:"Stwórz kopię zapasową",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Przywróć kopię zapasową",subtext:"Przywróć swoją instalacje GooseMod poprzez kopię zapasową, **przywracaj tylko kopie którym ufasz**",buttonText:"Przywróć",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Usprawnienia",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Drobne zmiany, jak na przykład interfejsu, by GooseMod był taki, jaki chcesz"},{type:"toggle",text:"Zastępczy obraz",subtext:"Używaj zastępczego obrazu w Sklepie dla modułów bez obrazków",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Zmniejszana Kategoria Główna",subtext:"Pozwalaj głównej kategorii na bycie zmniejszanej za pomocą ikonki",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperymentalne",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperymentalne ustawienia są niekompletne lub niestabilne, mogą zmniejszyć wrażenia z doświadczenia"},{type:"toggle",experimental:!0,text:"Atrybuty Danych",subtext:"Dodaje atrybuty do niektórych elementów dla motywów do użycia",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Fragmenty",subtext:"Aktywuje zakładkę \"Fragmenty\" w sklepie",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Wymuś ustawienia motywów",subtext:"Wymusza automatycznie wygenerowane ustawienia dla wszystkich motywów",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Ilość Gwiazdek",i="Wszyscy",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Sklep":"Zainstalowane";switch(r){case"A-Z":t.style.order="";break;case"Ostatnio zaktualizowane":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Ilość Gwiazdek":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Sklep"!==n&&n!==p||"Wszyscy"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Sklep";"Sklep"!==n&&"Zainstalowane"!==n&&(n="Sklep"),o.forEach(t);const a=""===d&&"Sklep"===n&&"Wszyscy"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nie znaleziono wyników"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nie znaleziono wyników",""!==d&&"Sklep"===n&&"Wszyscy"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nie znaleziono żadnych wyników, czy miałeś na myśli pluginy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nie znaleziono żadnych wyników, czy miałeś na myśli motywy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Wszystkie motywy"!==c.textContent&&"Wszystkie pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Motywy"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Wyszukaj pluginy":"Wyszukaj motywy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortuj według",options:["Ilość Gwiazdek","A-Z","Ostatnio zaktualizowane"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Wszyscy"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Najwyżej oceniane",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Ostatnio zaktualizowane",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Wszystkie pluginy":"Wszystkie motywy"},{type:"gm-footer"}]))),e.settings.createItem("Fragmenty",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Lista zmian",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduły GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Motywy"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Motywy":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Sklep GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Sklep GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Sklep GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Sklep GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Usuń",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Zainstaluj",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Motywy"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Usuń":"Zainstaluj",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tłumacz GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Programista GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Oficjalny Discord GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Usuń"===this.props.buttonText?"Zainstaluj":"Usuń",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Motywy"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduły GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otwórz Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Usuń"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Zweryfikowane poprzez PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Niezaufane poprzez PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Brak PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozytoria"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Nieprawidłowe repozytorium",{type:"error",timeout:5e3,subtext:"Nieprawidłowy format"});if(!confirm("Nieoficjalne repozytoria mogą wdrożyć zagrożenia ponieważ nie są kontrolowane przez programistów GooseMod. Nie jesteśmy odpowiedzialni za niebezpieczeństwa gdyż oddzielne repozytoria są dodawane przez użytkowników.\n\nJeśli nie ufasz właścicielowi tego repozytorium nie używaj go ponieważ może zagrozić twojej instalacji Discorda.\n\nNaciśnij OK aby potwierdzić dodawanie repozytorium."))return void goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Odmówiono potwierdzenie bezpieczeństwa"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("To repozytorium nie jest znane albo zaufane (brak weryfikacji PGP), proszę być ostrożnym na zapas. Miej pewność że ufasz właścicielowi tego repozytorium.\n\nAby rozwiązać problem poproś właściciela repozytorium aby dodał wsparcie PGP. \n\nNaciśnij OK jeśli chcesz dodać to repozytorium.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Odmówiono potwierdzenie bezpieczeństwa"}):goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Błąd Niezaufany PGP"})}},"Dodaj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Sklep"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Zainstalowane")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Odśwież",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozytoria",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Motywy",confirmText:"Przeglądaj motywy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Upiększ swojego Discorda z motywami"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Wybierz z ponad stu motywów aby zmienić oraz ulepszyć twój interfejs"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Przeglądaj Pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Ulepsz swojego Discorda pod maską"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy ulepszają twoje wrażenia poprzez ulepszania w aplikacji"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Sklep",confirmText:"Pokaż sklep na stronie głównej",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Przeglądaj motywy i pluginy w sklepie"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod używa swój własny sklep gdzie możesz łatwo znaleźć różne motywy i pluginy, potem je zainstalować"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ustawienia",confirmText:"Zobacz ustawienia GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ustawienia-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funkcje eksperymentalne",description:"Wypróbuj nowe eksperymentalne funkcje"},{name:"Przydatne narzędzia",description:"Rób kopie zapasowe, resetuj GooseMod\'a i więcej"},{name:"Poprawki/ulepszenia",description:"Dopasuj GooseMod\'a do swoich upodobań"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Używaj ustawień GooseMod\'a aby spersonalizować jego funkcje"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Jest wiele opcji które możesz zmienić"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Społeczność",confirmText:"Dołącz do Discorda GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Zadawaj pytania",description:"Zadawaj pytania i otrzymuj wsparcie techniczne"},{name:"Wiadomości",description:"Otrzymaj najnowsze wiadomości i ogłoszenia na temat GooseMod\'a"},{name:"Zaangażuj się",description:"Pomóż z sugestiami, wsparciem innych itd"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Dołącz do społeczności GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Dołącz do Discorda aby otrzymywać informacje i więcej"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Dowiedz się więcej",cancelText:"Nie jestem zainteresowany/ana",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Sklep",description:"Poznaj sklep GooseMod i co on zawiera"},{name:"Ustawienia",description:"Dowiedz się o ustawienia GooseMod oraz pluginach"},{name:"Społeczność",description:"Dołącz do naszego Discorda aby zadawać pytania, zostawiać opinie, bądź na czasie z wiadomościami i więcej"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Poznaj GooseMod\'a"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Przejdź krótki poradnik aby poznać podstawowe funkcje GooseMod\'a"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Motywy"===e[1])),snippets:e.settings.items.find((e=>"Fragmenty"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Motywy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Motywy","themes"),id:"gm-home-themes",text:"Motywy",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Fragmenty"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Fragmenty","snippets"),id:"gm-home-snippets",text:"Fragmenty",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Fragmenty"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Usuń":"Dodaj",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Dodaj",s.buttonText="Dodaj",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Usuń",s.buttonText="Usuń",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ustawienia":o="settings";break;case"Pluginy":o="plugins";break;case"Motywy":o="themes";break;case"Fragmenty":o="snippets";break;case"Lista zmian":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ustawienia"),t?void 0:o("Pluginy"),t?void 0:o("Motywy"),o("Lista zmian")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduły GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduły GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Motywy"===e[1]||"Fragmenty"===e[1])||!t.snippets&&"Fragmenty"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ustawienia":o="settings";break;case"Pluginy":o="plugins";break;case"Motywy":o="themes";break;case"Fragmenty":o="snippets";break;case"Lista zmian":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Motywy"!==t[1]&&"Fragmenty"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Motywy"!==e.target.textContent&&"Fragmenty"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Lista zmian",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduły GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Zrestartuj","Wymagany Restart","To ustawienie **wymaga ponownego uruchomienia discorda, aby zaczęło działać**. Przed ponownym uruchomieniem **możesz doświadczyć dziwnego zachowania klienta**")&&location.reload()};e.settings.createItem("Ustawienia",["",{type:"header",text:"Ustawienia"},{type:"toggle",text:"Lista zmian GooseMod",subtext:"Pokaż ustawienie \"Lista zmian\" GooseMod\'a",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Główne seperatory",subtext:"Pokaż seperatory pomiędzy głównymi ustawieniami GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Sklep na stronie głównej",subtext:"Opcje sklepu GooseMod na stronie głównej zamiast ustawień",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Sklep"},{type:"toggle",text:"Automatyczna aktualizacja",subtext:"Automatycznie aktualizuj repozytoria i pluginy co każdą godzinę",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Powiadomienia o Nowych Pluginach",subtext:"Pokazuje powiadomienie za każdym razem, gdy nowy plugin zostanie dodany do sklepu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Wygląd"},{type:"toggle",text:"Odznaki GooseMod",subtext:"Pokazuj odznaki GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Przydatne narzędzia"},{type:"text-and-button",text:"Wyczyść pamięć podręczna",subtext:"Czyści większość pamięci podręcznej którą używa GooseMod",buttonText:"Wyczyść",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Zacznij poradnik",subtext:"Uruchom poradnik która pojawia się na pierwszym starcie",buttonText:"Poradnik",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Skopiuj informacje do debugowania",subtext:"Kopiuje informacje na temat obecnej instalacji GooseMod, użyteczne do zgłaszania błędów i debugowania",buttonText:"Kopiuj",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Zresetuj GooseMod",subtext:"Całkowicie resetuje GooseMod\'a: usuwa wszystkie preferencje, moduły; Resetuje do stanu początkowego",buttonText:"Resetuj",onclick:async()=>{await e.confirmDialog("Wyzeruj","Wyzeruj GooseMod\'a","Potwierdzenie spowoduje całkowite wyzerowanie danych GooseMod\'a. Zostaną usunięte wszystkie pluginy oraz ustawienia. Tak jakbyś zainstalował po raz pierwszy raz GooseMod\'a. Jest to nieodwracalne.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Kopie zapasowe"},{type:"text-and-button",text:"Stwórz kopie zapasową",subtext:"Tworzy kopię zapasową w formie pliku dla wszystkich modułów oraz ustawień",buttonText:"Stwórz kopię zapasową",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Przywróć kopię zapasową",subtext:"Przywróć swoją instalacje GooseMod poprzez kopię zapasową, **przywracaj tylko kopie którym ufasz**",buttonText:"Przywróć",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Usprawnienia",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Drobne zmiany, jak na przykład interfejsu, by GooseMod był taki, jaki chcesz"},{type:"toggle",text:"Zastępczy obraz",subtext:"Używaj zastępczego obrazu w Sklepie dla modułów bez obrazków",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Zmniejszana Kategoria Główna",subtext:"Pozwalaj głównej kategorii na bycie zmniejszanej za pomocą ikonki",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Eksperymentalne",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Eksperymentalne ustawienia są niekompletne lub niestabilne, mogą zmniejszyć wrażenia z doświadczenia"},{type:"toggle",experimental:!0,text:"Atrybuty Danych",subtext:"Dodaje atrybuty do niektórych elementów dla motywów do użycia",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Fragmenty",subtext:"Aktywuje zakładkę \"Fragmenty\" w sklepie",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Wymuś ustawienia motywów",subtext:"Wymusza automatycznie wygenerowane ustawienia dla wszystkich motywów",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Ilość Gwiazdek",i="Wszyscy",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Sklep":"Zainstalowane";switch(r){case"A-Z":t.style.order="";break;case"Ostatnio zaktualizowane":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Ilość Gwiazdek":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Sklep"!==n&&n!==p||"Wszyscy"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Sklep";"Sklep"!==n&&"Zainstalowane"!==n&&(n="Sklep"),o.forEach(t);const a=""===d&&"Sklep"===n&&"Wszyscy"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nie znaleziono wyników"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nie znaleziono wyników",""!==d&&"Sklep"===n&&"Wszyscy"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nie znaleziono żadnych wyników, czy miałeś na myśli pluginy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nie znaleziono żadnych wyników, czy miałeś na myśli motywy?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Wszystkie motywy"!==c.textContent&&"Wszystkie pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Motywy"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Wyszukaj pluginy":"Wyszukaj motywy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortuj według",options:["Ilość Gwiazdek","A-Z","Ostatnio zaktualizowane"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Wszyscy"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Najwyżej oceniane",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Ostatnio zaktualizowane",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Wszystkie pluginy":"Wszystkie motywy"},{type:"gm-footer"}]))),e.settings.createItem("Fragmenty",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Lista zmian",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduły GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Motywy"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Motywy":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Sklep GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Sklep GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Sklep GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Sklep GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Usuń",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Zainstaluj",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Motywy"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Usuń":"Zainstaluj",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tłumacz GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Programista GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Oficjalny Discord GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Usuń"===this.props.buttonText?"Zainstaluj":"Usuń",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Motywy"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduły GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otwórz Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Usuń"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Zweryfikowane poprzez PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Niezaufane poprzez PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Brak PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozytoria"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Nieprawidłowe repozytorium",{type:"error",timeout:5e3,subtext:"Nieprawidłowy format"});if(!confirm("Nieoficjalne repozytoria mogą wdrożyć zagrożenia ponieważ nie są kontrolowane przez programistów GooseMod. Nie jesteśmy odpowiedzialni za niebezpieczeństwa gdyż oddzielne repozytoria są dodawane przez użytkowników.\n\nJeśli nie ufasz właścicielowi tego repozytorium nie używaj go ponieważ może zagrozić twojej instalacji Discorda.\n\nNaciśnij OK aby potwierdzić dodawanie repozytorium."))return void goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Odmówiono potwierdzenie bezpieczeństwa"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("To repozytorium nie jest znane albo zaufane (brak weryfikacji PGP), proszę być ostrożnym na zapas. Miej pewność że ufasz właścicielowi tego repozytorium.\n\nAby rozwiązać problem poproś właściciela repozytorium aby dodał wsparcie PGP. \n\nNaciśnij OK jeśli chcesz dodać to repozytorium.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Odmówiono potwierdzenie bezpieczeństwa"}):goosemod.showToast("Anulowano dodawanie repozytorium",{type:"danger",timeout:5e3,subtext:"Błąd Niezaufany PGP"})}},"Dodaj")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Sklep"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Zainstalowane")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Odśwież",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozytoria",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.pt-BR.js b/goosemod.pt-BR.js index 04e0521c..65b1575b 100644 --- a/goosemod.pt-BR.js +++ b/goosemod.pt-BR.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Pesquise por Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embeleze seu Discord com Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Escolha entre mais de 100 temas para melhorar a sua experiência e sua interface de usuário"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Pesquisar por Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifique o seu Discord de maneira superficial"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins acrescentam sua experiência com melhorias no próprio aplicativo"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Loja",confirmText:"Ver a Loja na Pagina Inicial",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procure por Temas e Plugins na Loja"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"O GooseMod usa a sua própria Loja, onde você pode olhar facilmente ao redor e instalar"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Configurações",confirmText:"Ver as Configurações do GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Configurações-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funções Experimentais",description:"Tente usar as novas funções experimentais"},{name:"Utilidades",description:"Faça backups, redefinir o GooseMod, e mais"},{name:"Ajustes",description:"Ajuste o GooseMod do jeito que preferir"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use as Configurações do GooseMod para customizar suas funções"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Há varias opções para você mudar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidade",confirmText:"Entre no Discord do GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Pergunte Questões",description:"Pergunte qualquer questão e tenha suporte"},{name:"Novidades",description:"Receba as últimas notícias e anúncios sobre o GooseMod e projetos relacionados"},{name:"Se Envolva Conosco",description:"Ajude com sugestões, ajude os outros, e mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Entre na Comunidade do GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Entre no nosso Discord para futuras informações e mais"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saber Mais",cancelText:"Não Interessado",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Loja",description:"Leia sobre a Loja do GooseMod"},{name:"Configurações",description:"Descubra mais sobre as configurações do GooseMod e os plugins"},{name:"Comunidade",description:"Entre no nosso Discord para perguntar questões, dar um feedback, manter-se atualizado com as novidades, e mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Leia sobre o GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faça um pequeno tour dentro das funções principais do GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remover":"Adicionar",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adicionar",s.buttonText="Adicionar",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remover",s.buttonText="Remover",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Configurações":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Snippets":o="snippets";break;case"Registro de Alterações":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Configurações"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Registro de Alterações")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos do GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos do GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Configurações":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Snippets":o="snippets";break;case"Registro de Alterações":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro de Alterações",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos do GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Reiniciar","Requer uma Reinicialização","Essa configuração**requer uma reinicialização para fazer efeito**. Você **pode experienciar alguns comportamentos anormais** nessa sessão antes de reiniciar.")&&location.reload()};e.settings.createItem("Configurações",["",{type:"header",text:"Configurações"},{type:"toggle",text:"Registro de Alterações do GooseMod",subtext:"Mostrar \"Registro de Alterações\" do GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principais",subtext:"Mostrar separadores entre as principais configurações do GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Loja na página Inicial",subtext:"Colocar a Loja do GooseMod na Tela Inicial ao invés de mostrar nas configurações",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Loja"},{type:"toggle",text:"Atualização Automatica",subtext:"Atualiza automaticamente seus repositórios e módulos a cada hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Novas Modificações de Módulo",subtext:"Mostra uma Notificação toda vez que um módulo novo é adicionado a Loja",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aparência"},{type:"toggle",text:"Emblemas do GooseMod",subtext:"Mostra os Emblemas do GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Limpar Caches",subtext:"Limpa (remove completamente) a maioria dos caches que o GooseMod usa",buttonText:"Limpar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Começar Tour",subtext:"Passar de novo pelo tour do GooseMod",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar informações de Depuração",subtext:"Copia informações do setup e do GooseMod para reportar e depurar",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Redefinir GooseMod",subtext:"Redefine o GooseMod completamente: remove todas preferencias e módulos; como se fosse uma instalação nova",buttonText:"Redefinir",onclick:async()=>{await e.confirmDialog("Resetar","Resetar GooseMod","Confirmando vai completamente remover GooseMod, removendo todas as configurações e módulos; como se você tivesse instalado GooseMod pela primeira vez. Isso é irreversível.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Criar Backup",subtext:"Cria um arquivo de backup de seus módulos e configurações do GooseMod",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurar Backup",subtext:"Restaura seus módulos e configurações do GooseMod pelo arquivo de backup, **não restaure arquivos de backup não confiáveis**",buttonText:"Restaurar",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mudanças minimas como pequenas mudanças na Interface do Usuário, deixando o GooseMod do jeito que você preferir"},{type:"toggle",text:"Imagem de Modelo",subtext:"Use uma imagem de modelo para os modulos sem imagens na Loja",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria de Início Colapsável",subtext:"Deixa a categoria de Início colapsível pelo icone",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Configurações experimentais provavelmente serão incompletas e instáveis, o que pode resultar numa experiência reduzida"},{type:"toggle",experimental:!0,text:"Atributos de Dados",subtext:"Adiciona atributos de dados de alguns elementos para temas usarem",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Prévias",subtext:"Habilita a aba de Prévias na Loja",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forçar Configurações de Temas",subtext:"Força configurações geradas automaticamente para todos os temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrelas",i="Todos",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Loja":"Instalados";switch(r){case"A-Z":t.style.order="";break;case"Última Atualização":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrelas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Loja"!==n&&n!==p||"Todos"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Loja";"Loja"!==n&&"Instalados"!==n&&(n="Loja"),o.forEach(t);const a=""===d&&"Loja"===n&&"Todos"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Sem Resultados"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Sem Resultados",""!==d&&"Loja"===n&&"Todos"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem Resultados, você pesquisou por plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem Resultados, você pesquisou por temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos os Temas"!==c.textContent&&"Todos os Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Procurar por Plugins":"Procurar por Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrelas","A-Z","Última Atualização"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Todos"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Com Mais Estrelas",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Atualizado Recentemente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos os Plugins":"Todos os Temas"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro de Alterações",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos do GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Loja do GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Loja do GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Loja do GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Loja do GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remover",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remover":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Patrocinador do GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tradutor do GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desenvolvedor do GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial do GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remover"===this.props.buttonText?"Instalar":"Remover",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos do GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Abrir Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remover"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Assinatura PGP Verificada",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Assinatura PGP Não Confiável",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Assinatura PGP Não Apresentada",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositórios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositório Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Repositórios externos podem comprometer sua segurança, pois não são controlados por desenvolvedores do GooseMod. Nós não somos responsáveis por quaisquer problemas causados por repositórios adicionados por usuários.\n\nSe você não confia no dono desse repositório, não o use, pois o mesmo poderá comprometer sua instancia do Discord.\n\nPor favor, confirme a sua decisão de adicionar esse repositório clicando no OK."))return void goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de Segurança Recusado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Esse repositório não é conhecido e nem confiável (sem assinatura PGP), por favor seja mais cuidadoso ainda. Tenha certeza que você confia no dono desse repositório.\n\nPara resolver esse problema, peça ao dono do repositório para que adicione suporte a assinatura PGP.\n\nPor favor reconfirme a sua decisão de adicionar esse repositório clicando no OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de Segurança Recusado"}):goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Falha na Assinatura PGP Não Confiável"})}},"Adicionar")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Loja"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalados")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Recarregar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositórios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Pesquise por Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embeleze seu Discord com Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Escolha entre mais de 100 temas para melhorar a sua experiência e sua interface de usuário"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Pesquisar por Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifique o seu Discord de maneira superficial"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins acrescentam sua experiência com melhorias no próprio aplicativo"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Loja",confirmText:"Ver a Loja na Pagina Inicial",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procure por Temas e Plugins na Loja"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"O GooseMod usa a sua própria Loja, onde você pode olhar facilmente ao redor e instalar"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Configurações",confirmText:"Ver as Configurações do GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Configurações-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funções Experimentais",description:"Tente usar as novas funções experimentais"},{name:"Utilidades",description:"Faça backups, redefinir o GooseMod, e mais"},{name:"Ajustes",description:"Ajuste o GooseMod do jeito que preferir"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use as Configurações do GooseMod para customizar suas funções"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Há varias opções para você mudar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidade",confirmText:"Entre no Discord do GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Pergunte Questões",description:"Pergunte qualquer questão e tenha suporte"},{name:"Novidades",description:"Receba as últimas notícias e anúncios sobre o GooseMod e projetos relacionados"},{name:"Se Envolva Conosco",description:"Ajude com sugestões, ajude os outros, e mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Entre na Comunidade do GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Entre no nosso Discord para futuras informações e mais"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Saber Mais",cancelText:"Não Interessado",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Loja",description:"Leia sobre a Loja do GooseMod"},{name:"Configurações",description:"Descubra mais sobre as configurações do GooseMod e os plugins"},{name:"Comunidade",description:"Entre no nosso Discord para perguntar questões, dar um feedback, manter-se atualizado com as novidades, e mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Leia sobre o GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faça um pequeno tour dentro das funções principais do GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remover":"Adicionar",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adicionar",s.buttonText="Adicionar",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remover",s.buttonText="Remover",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Configurações":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Snippets":o="snippets";break;case"Registro de Alterações":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Configurações"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Registro de Alterações")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos do GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos do GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Configurações":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Snippets":o="snippets";break;case"Registro de Alterações":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro de Alterações",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos do GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Reiniciar","Requer uma Reinicialização","Essa configuração**requer uma reinicialização para fazer efeito**. Você **pode experienciar alguns comportamentos anormais** nessa sessão antes de reiniciar.")&&location.reload()};e.settings.createItem("Configurações",["",{type:"header",text:"Configurações"},{type:"toggle",text:"Registro de Alterações do GooseMod",subtext:"Mostrar \"Registro de Alterações\" do GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principais",subtext:"Mostrar separadores entre as principais configurações do GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Loja na página Inicial",subtext:"Colocar a Loja do GooseMod na Tela Inicial ao invés de mostrar nas configurações",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Loja"},{type:"toggle",text:"Atualização Automatica",subtext:"Atualiza automaticamente seus repositórios e módulos a cada hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Novas Modificações de Módulo",subtext:"Mostra uma Notificação toda vez que um módulo novo é adicionado a Loja",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aparência"},{type:"toggle",text:"Emblemas do GooseMod",subtext:"Mostra os Emblemas do GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Limpar Caches",subtext:"Limpa (remove completamente) a maioria dos caches que o GooseMod usa",buttonText:"Limpar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Começar Tour",subtext:"Passar de novo pelo tour do GooseMod",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar informações de Depuração",subtext:"Copia informações do setup e do GooseMod para reportar e depurar",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Redefinir GooseMod",subtext:"Redefine o GooseMod completamente: remove todas preferencias e módulos; como se fosse uma instalação nova",buttonText:"Redefinir",onclick:async()=>{await e.confirmDialog("Resetar","Resetar GooseMod","Confirmando vai completamente remover GooseMod, removendo todas as configurações e módulos; como se você tivesse instalado GooseMod pela primeira vez. Isso é irreversível.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Criar Backup",subtext:"Cria um arquivo de backup de seus módulos e configurações do GooseMod",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurar Backup",subtext:"Restaura seus módulos e configurações do GooseMod pelo arquivo de backup, **não restaure arquivos de backup não confiáveis**",buttonText:"Restaurar",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mudanças minimas como pequenas mudanças na Interface do Usuário, deixando o GooseMod do jeito que você preferir"},{type:"toggle",text:"Imagem de Modelo",subtext:"Use uma imagem de modelo para os modulos sem imagens na Loja",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria de Início Colapsável",subtext:"Deixa a categoria de Início colapsível pelo icone",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Configurações experimentais provavelmente serão incompletas e instáveis, o que pode resultar numa experiência reduzida"},{type:"toggle",experimental:!0,text:"Atributos de Dados",subtext:"Adiciona atributos de dados de alguns elementos para temas usarem",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Prévias",subtext:"Habilita a aba de Prévias na Loja",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forçar Configurações de Temas",subtext:"Força configurações geradas automaticamente para todos os temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrelas",i="Todos",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Loja":"Instalados";switch(r){case"A-Z":t.style.order="";break;case"Última Atualização":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrelas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Loja"!==n&&n!==p||"Todos"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Loja";"Loja"!==n&&"Instalados"!==n&&(n="Loja"),o.forEach(t);const a=""===d&&"Loja"===n&&"Todos"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Sem Resultados"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Sem Resultados",""!==d&&"Loja"===n&&"Todos"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem Resultados, você pesquisou por plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem Resultados, você pesquisou por temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos os Temas"!==c.textContent&&"Todos os Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Procurar por Plugins":"Procurar por Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrelas","A-Z","Última Atualização"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Todos"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Com Mais Estrelas",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Atualizado Recentemente",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos os Plugins":"Todos os Temas"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro de Alterações",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos do GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Loja do GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Loja do GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Loja do GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Loja do GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remover",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remover":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Patrocinador do GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tradutor do GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desenvolvedor do GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial do GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remover"===this.props.buttonText?"Instalar":"Remover",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos do GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Abrir Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remover"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Assinatura PGP Verificada",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Assinatura PGP Não Confiável",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Assinatura PGP Não Apresentada",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositórios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositório Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Repositórios externos podem comprometer sua segurança, pois não são controlados por desenvolvedores do GooseMod. Nós não somos responsáveis por quaisquer problemas causados por repositórios adicionados por usuários.\n\nSe você não confia no dono desse repositório, não o use, pois o mesmo poderá comprometer sua instancia do Discord.\n\nPor favor, confirme a sua decisão de adicionar esse repositório clicando no OK."))return void goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de Segurança Recusado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Esse repositório não é conhecido e nem confiável (sem assinatura PGP), por favor seja mais cuidadoso ainda. Tenha certeza que você confia no dono desse repositório.\n\nPara resolver esse problema, peça ao dono do repositório para que adicione suporte a assinatura PGP.\n\nPor favor reconfirme a sua decisão de adicionar esse repositório clicando no OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de Segurança Recusado"}):goosemod.showToast("Adição do Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Falha na Assinatura PGP Não Confiável"})}},"Adicionar")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Loja"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalados")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Recarregar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositórios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.pt-PT.js b/goosemod.pt-PT.js index a74db2b5..764e43ee 100644 --- a/goosemod.pt-PT.js +++ b/goosemod.pt-PT.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Pesquisar Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embeleza o Discord com Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Escolhe entre mais de 100 temas para melhorar a tua experiência e interface de utilizador"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Procurar Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifique o Discord debaixo do capô"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Os plugins aumentam sua experiência com melhorias no próprio aplicativo"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Loja",confirmText:"Ver Loja no Início",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procurar Temas e Plugins na Loja"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa a sua própria loja, onde tu podes facilmente encontrar e instalar"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Definições",confirmText:"Ver definições do GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Definições-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funções Experimentais",description:"Testa as novas funções experimentais"},{name:"Utilidades",description:"Faça backups, redefina GooseMod, e mais"},{name:"Ajustes",description:"Ajuste GooseMod de como você deseja"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use as definições de GooseMod para customizar os seus recursos"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Existem várias opções que podes alterar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidade",confirmText:"Entra no Discord do GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Faz Perguntas",description:"Pergunta qualquer coisa e recebe ajuda"},{name:"Notícias",description:"Recebe as últimas noticias e anúncios sobre o GooseMod e projetos relacionados"},{name:"Fique envolvido",description:"Ajude com sugestões, apoiando outras pessoas e muito mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Entra na Comunidade do GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Entra no nosso Discord para receberes informações e muito mais"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Leia Mais",cancelText:"Não interessado",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Loja",description:"Aprenda sobre a Loja GooseMod e o que há nela"},{name:"Definições",description:"Descubra as configurações do GooseMod e plugins"},{name:"Comunidade",description:"Participe do nosso Discord para fazer perguntas, dar feedback, manter-se atualizado com notícias e muito mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Aprende sobre o GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faça um breve tutorial pelas principais funções do GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Trechos"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Trechos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Trechos","snippets"),id:"gm-home-snippets",text:"Trechos",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Trechos"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remover":"Adicionar",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adicionar",s.buttonText="Adicionar",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remover",s.buttonText="Remover",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Definições":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Trechos":o="snippets";break;case"Registro de Alterações":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Definições"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Registro de Alterações")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Trechos"===e[1])||!t.snippets&&"Trechos"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Definições":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Trechos":o="snippets";break;case"Registro de Alterações":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Trechos"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Trechos"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro de Alterações",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Definições",["",{type:"header",text:"Definições"},{type:"toggle",text:"Registro de Alterações GooseMod",subtext:"Mostrar configuração \"Registro de Alterações\" GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principais",subtext:"Mostrar separadores entre as definições principais do GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Loja no Ínicio",subtext:"Colocar a Loja do GooseMod no Início ao invés de mostrar nas configurações",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Loja"},{type:"toggle",text:"Atualizar Automaticamente",subtext:"Atualizar automaticamente repositórios e módulos a cada 1 hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notificações de Novo Módulo",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aparência"},{type:"toggle",text:"Insígnias GooseMod",subtext:"Mostrar insígnias GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Apagar Caches",subtext:"Apagar (completamente) a maioria das caches que o GooseMod usa",buttonText:"Apagar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Começar Tutorial",subtext:"Passe pelo tutorial de inicialização do GooseMod novamente",buttonText:"Tutorial",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar informação de Debug",subtext:"Copia as informações sobre a configuração e o GooseMod para relatórios e depuração",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Redefinir GooseMod",subtext:"Redefine o GooseMod completamente: remove todas as preferências e módulos; como uma instalação pela primeira vez",buttonText:"Recomeçar",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Criar Backup",subtext:"Criar um ficheiro de backup para todos os módulos e definições do GooseMod",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurar Backup",subtext:"Restaure seus módulos e configurações do GooseMod por meio de um arquivo de backup, **restaure apenas os backups em que você confia**",buttonText:"Restaurar",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mudanças mínimas como pequenas mudanças na Interface do Usuário fazem o GooseMod do jeito que você gostar"},{type:"toggle",text:"Imagem de Modelo",subtext:"Use uma imagem de modelo na Loja para módulos sem imagens",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria do Início Colapsável",subtext:"Deixe Categoria do Início ser colapsável por icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Configurações experimentais são provavelmente incompletas e instáveis, o que pode resultar em uma experiência reduzida"},{type:"toggle",experimental:!0,text:"Atributos de dados",subtext:"Adicione atributos de dados a alguns elementos para alguns temas usarem",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Trechos",subtext:"Ativar separador de Trechos na Loja",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forçar configurações do tema",subtext:"Forçar configurações geradas automaticamente para todos os temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrelas",i="Tudo",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Loja":"Instalado";switch(r){case"A-Z":t.style.order="";break;case"Ultima atualização":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrelas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Loja"!==n&&n!==p||"Tudo"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Loja";"Loja"!==n&&"Instalado"!==n&&(n="Loja"),o.forEach(t);const a=""===d&&"Loja"===n&&"Tudo"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nenhum resultado encontrado"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nenhum resultado encontrado",""!==d&&"Loja"===n&&"Tudo"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem resultados encontrados, você quis dizer plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem resultados encontrados, você quis dizer temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos os Temas"!==c.textContent&&"Todos os Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Procurar Plugins":"Procurar Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrelas","A-Z","Ultima atualização"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tudo"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Com mais estrelas",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recentemente Atualizado",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos os Plugins":"Todos os Temas"},{type:"gm-footer"}]))),e.settings.createItem("Trechos",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro de Alterações",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Loja GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Loja GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Loja GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Loja GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remover",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remover":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Patrocinador do GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tradutor do GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desenvolvedor do GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remover"===this.props.buttonText?"Instalar":"Remover",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Hiperligação Aberta"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remover"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verificado",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Não Confiável",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Sem PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositórios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositório Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Repositórios externos podem comprometer a tua segurança, pois não são controladas por desenvolvedores GooseMod. Nós não nos responsabilizamos por quaisquer perigos devido a repositórios externos adicionados pelos utilizadores.\n\nSe você não confia no dono deste repositório não o use, pois, pode comprometer a instalação do seu Discord.\n\nPor favor, confirme adicionando este repositório pressionando OK."))return void goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de segurança recusado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Este repositório não é conhecido e nem confiável (sem verificação PGP), por favor seja mais cuidadoso ainda. Tenha certeza que você confia completamente no(s) dono(s) deste repositório.\n\nPara resolver esse problema, peça ao dono do repositório para que adicione suporte a PGP.\n\nPor favor, reconfirme sua decisão de adicionar este repositório clicando no OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de segurança recusado"}):goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Falha de PGP não confiável"})}},"Adicionar")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Loja"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalado")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Atualizar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositórios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temas",confirmText:"Pesquisar Temas",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Embeleza o Discord com Temas"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Escolhe entre mais de 100 temas para melhorar a tua experiência e interface de utilizador"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugins",confirmText:"Procurar Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplifique o Discord debaixo do capô"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Os plugins aumentam sua experiência com melhorias no próprio aplicativo"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Loja",confirmText:"Ver Loja no Início",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Procurar Temas e Plugins na Loja"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod usa a sua própria loja, onde tu podes facilmente encontrar e instalar"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Definições",confirmText:"Ver definições do GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Definições-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Funções Experimentais",description:"Testa as novas funções experimentais"},{name:"Utilidades",description:"Faça backups, redefina GooseMod, e mais"},{name:"Ajustes",description:"Ajuste GooseMod de como você deseja"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use as definições de GooseMod para customizar os seus recursos"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Existem várias opções que podes alterar"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunidade",confirmText:"Entra no Discord do GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Faz Perguntas",description:"Pergunta qualquer coisa e recebe ajuda"},{name:"Notícias",description:"Recebe as últimas noticias e anúncios sobre o GooseMod e projetos relacionados"},{name:"Fique envolvido",description:"Ajude com sugestões, apoiando outras pessoas e muito mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Entra na Comunidade do GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Entra no nosso Discord para receberes informações e muito mais"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Leia Mais",cancelText:"Não interessado",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Loja",description:"Aprenda sobre a Loja GooseMod e o que há nela"},{name:"Definições",description:"Descubra as configurações do GooseMod e plugins"},{name:"Comunidade",description:"Participe do nosso Discord para fazer perguntas, dar feedback, manter-se atualizado com notícias e muito mais"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Aprende sobre o GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Faça um breve tutorial pelas principais funções do GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugins"===e[1])),themes:e.settings.items.find((e=>"Temas"===e[1])),snippets:e.settings.items.find((e=>"Trechos"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temas"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temas","themes"),id:"gm-home-themes",text:"Temas",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugins"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugins","plugins"),id:"gm-home-plugins",text:"Plugins",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Trechos"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Trechos","snippets"),id:"gm-home-snippets",text:"Trechos",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Trechos"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Remover":"Adicionar",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adicionar",s.buttonText="Adicionar",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Remover",s.buttonText="Remover",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Definições":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Trechos":o="snippets";break;case"Registro de Alterações":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Definições"),t?void 0:o("Plugins"),t?void 0:o("Temas"),o("Registro de Alterações")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Módulos GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Módulos GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugins"===e[1]||"Temas"===e[1]||"Trechos"===e[1])||!t.snippets&&"Trechos"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Definições":o="settings";break;case"Plugins":o="plugins";break;case"Temas":o="themes";break;case"Trechos":o="snippets";break;case"Registro de Alterações":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugins"!==t[1]&&"Temas"!==t[1]&&"Trechos"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugins"!==e.target.textContent&&"Temas"!==e.target.textContent&&"Trechos"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Registro de Alterações",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Módulos GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Definições",["",{type:"header",text:"Definições"},{type:"toggle",text:"Registro de Alterações GooseMod",subtext:"Mostrar configuração \"Registro de Alterações\" GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separadores Principais",subtext:"Mostrar separadores entre as definições principais do GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Loja no Ínicio",subtext:"Colocar a Loja do GooseMod no Início ao invés de mostrar nas configurações",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Loja"},{type:"toggle",text:"Atualizar Automaticamente",subtext:"Atualizar automaticamente repositórios e módulos a cada 1 hora",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notificações de Novo Módulo",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aparência"},{type:"toggle",text:"Insígnias GooseMod",subtext:"Mostrar insígnias GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilidades"},{type:"text-and-button",text:"Apagar Caches",subtext:"Apagar (completamente) a maioria das caches que o GooseMod usa",buttonText:"Apagar",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Começar Tutorial",subtext:"Passe pelo tutorial de inicialização do GooseMod novamente",buttonText:"Tutorial",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiar informação de Debug",subtext:"Copia as informações sobre a configuração e o GooseMod para relatórios e depuração",buttonText:"Copiar",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Redefinir GooseMod",subtext:"Redefine o GooseMod completamente: remove todas as preferências e módulos; como uma instalação pela primeira vez",buttonText:"Recomeçar",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Criar Backup",subtext:"Criar um ficheiro de backup para todos os módulos e definições do GooseMod",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restaurar Backup",subtext:"Restaure seus módulos e configurações do GooseMod por meio de um arquivo de backup, **restaure apenas os backups em que você confia**",buttonText:"Restaurar",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustes",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Mudanças mínimas como pequenas mudanças na Interface do Usuário fazem o GooseMod do jeito que você gostar"},{type:"toggle",text:"Imagem de Modelo",subtext:"Use uma imagem de modelo na Loja para módulos sem imagens",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Categoria do Início Colapsável",subtext:"Deixe Categoria do Início ser colapsável por icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimental",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Configurações experimentais são provavelmente incompletas e instáveis, o que pode resultar em uma experiência reduzida"},{type:"toggle",experimental:!0,text:"Atributos de dados",subtext:"Adicione atributos de dados a alguns elementos para alguns temas usarem",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Trechos",subtext:"Ativar separador de Trechos na Loja",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forçar configurações do tema",subtext:"Forçar configurações geradas automaticamente para todos os temas",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Estrelas",i="Tudo",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Loja":"Instalado";switch(r){case"A-Z":t.style.order="";break;case"Ultima atualização":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Estrelas":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Loja"!==n&&n!==p||"Tudo"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Loja";"Loja"!==n&&"Instalado"!==n&&(n="Loja"),o.forEach(t);const a=""===d&&"Loja"===n&&"Tudo"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nenhum resultado encontrado"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nenhum resultado encontrado",""!==d&&"Loja"===n&&"Tudo"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem resultados encontrados, você quis dizer plugins?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sem resultados encontrados, você quis dizer temas?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Todos os Temas"!==c.textContent&&"Todos os Plugins"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugins","Temas"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Procurar Plugins":"Procurar Temas",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Ordenar por",options:["Estrelas","A-Z","Ultima atualização"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tudo"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Com mais estrelas",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Recentemente Atualizado",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Todos os Plugins":"Todos os Temas"},{type:"gm-footer"}]))),e.settings.createItem("Trechos",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Registro de Alterações",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Módulos GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugins"===e||"Temas"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temas":"Plugins",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Loja GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Loja GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Loja GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Loja GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Remover",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalar",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugins"===e[1]||"Temas"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Remover":"Instalar",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Patrocinador do GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Tradutor do GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Desenvolvedor do GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord Oficial de GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Remover"===this.props.buttonText?"Instalar":"Remover",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temas"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugins"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Módulos GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Hiperligação Aberta"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Remover"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verificado",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Não Confiável",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Sem PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repositórios"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Repositório Inválido",{type:"error",timeout:5e3,subtext:"Formato Inválido"});if(!confirm("Repositórios externos podem comprometer a tua segurança, pois não são controladas por desenvolvedores GooseMod. Nós não nos responsabilizamos por quaisquer perigos devido a repositórios externos adicionados pelos utilizadores.\n\nSe você não confia no dono deste repositório não o use, pois, pode comprometer a instalação do seu Discord.\n\nPor favor, confirme adicionando este repositório pressionando OK."))return void goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de segurança recusado"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Este repositório não é conhecido e nem confiável (sem verificação PGP), por favor seja mais cuidadoso ainda. Tenha certeza que você confia completamente no(s) dono(s) deste repositório.\n\nPara resolver esse problema, peça ao dono do repositório para que adicione suporte a PGP.\n\nPor favor, reconfirme sua decisão de adicionar este repositório clicando no OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Aviso de segurança recusado"}):goosemod.showToast("Adição de Repositório Cancelada",{type:"danger",timeout:5e3,subtext:"Falha de PGP não confiável"})}},"Adicionar")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Loja"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalado")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Atualizar",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repositórios",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.ro.js b/goosemod.ro.js index 16e60f1e..72ce0805 100644 --- a/goosemod.ro.js +++ b/goosemod.ro.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teme",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugin-uri",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Magazin",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Setări",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Setări-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilităţi",description:"Make backups, reset GooseMod, and more"},{name:"Ajustări",description:"Ajustează GooseMod cum vrei tu"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunitate",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"Știri",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Află mai multe",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Magazin",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Setări",description:"Find out about the settings for GooseMod and plugins"},{name:"Comunitate",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugin-uri"===e[1])),themes:e.settings.items.find((e=>"Teme"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teme"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teme","themes"),id:"gm-home-themes",text:"Teme",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugin-uri"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugin-uri","plugins"),id:"gm-home-plugins",text:"Plugin-uri",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Eliminați":"Adăugați",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adăugați",s.buttonText="Adăugați",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Eliminați",s.buttonText="Eliminați",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Setări":o="settings";break;case"Plugin-uri":o="plugins";break;case"Teme":o="themes";break;case"Snippets":o="snippets";break;case"Jurnal de modificări":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Setări"),t?void 0:o("Plugin-uri"),t?void 0:o("Teme"),o("Jurnal de modificări")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Module GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Module GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugin-uri"===e[1]||"Teme"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Setări":o="settings";break;case"Plugin-uri":o="plugins";break;case"Teme":o="themes";break;case"Snippets":o="snippets";break;case"Jurnal de modificări":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugin-uri"!==t[1]&&"Teme"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugin-uri"!==e.target.textContent&&"Teme"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Jurnal de modificări",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Module GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Setări",["",{type:"header",text:"Setări"},{type:"toggle",text:"Jurnal de modificări GooseMod",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separatori Primari",subtext:"Afișează separatori între setările primare GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Magazin"},{type:"toggle",text:"Actualizare automată",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aspect"},{type:"toggle",text:"Insignele GooseMod",subtext:"Afișează insignele GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilităţi"},{type:"text-and-button",text:"Ștergeți cache-urile",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Începeți turul",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiază Informații Debug",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copiază",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetează GooseMod",subtext:"Resetează GooseMod complet: șterge toate preferințe și modulele; ca instalarea inițială",buttonText:"Resetează",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustări",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Schimbări minore cum ar fi schimbări ale UI-ului pentru a face GooseMod pe placul tău"},{type:"toggle",text:"Placeholder Image",subtext:"Folosește o imagine înlocuitoare în Magazin pentru modulele fără imagini",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentale",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Setările experimentale sunt foarte posibil incomplete și instabile, ceea ce poate rezulta într-o experiență redusă"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forțează Setările Temei",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stele",i="Toate",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Magazin":"Instalat";switch(r){case"A-Z":t.style.order="";break;case"Ultima actualizare":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stele":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Magazin"!==n&&n!==p||"Toate"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Magazin";"Magazin"!==n&&"Instalat"!==n&&(n="Magazin"),o.forEach(t);const a=""===d&&"Magazin"===n&&"Toate"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nu s-au găsit rezultate"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nu s-au găsit rezultate",""!==d&&"Magazin"===n&&"Toate"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nu s-au găsit rezultate, te-ai referit la plugin-uri?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nu s-au găsit rezultate, te-ai referit la teme?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Toate temele"!==c.textContent&&"Toate plugin-urile"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugin-uri","Teme"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Căutați plugin-uri":"Căutați teme",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Filtrează după",options:["Stele","A-Z","Ultima actualizare"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Toate"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Stelate",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Actualizat Recent",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Toate plugin-urile":"Toate temele"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Jurnal de modificări",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Module GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugin-uri"===e||"Teme"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teme":"Plugin-uri",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Magazinul GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Magazinul GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Magazinul GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Magazinul GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Eliminați",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalați",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugin-uri"===e[1]||"Teme"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Eliminați":"Instalați",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Translator GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Dezvoltator GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord-ul Official GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Eliminați"===this.props.buttonText?"Instalați":"Eliminați",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teme"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugin-uri"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Module GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Deschide Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Eliminați"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificat PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP de neîncredere",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Fără PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Format nevalid"});if(!confirm("Repositurile externe pot fi un risc de securitate deoarece nu sunt controlate de către dezvoltării GooseMod. Noi nu suntem responsabili de pericolele cauzate de către repositurile externe adăugate de utilizatori.\n\nDacă nu ai încredere în deținătorul acestui repo nu îl folosi deoarece îți poate compromite Discord-ul.\n\nConfirmă adăugarea acestui repo apăsând OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Adăugați")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Magazin"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalat")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Reîmprospătați",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teme",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Plugin-uri",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Magazin",confirmText:"View Store in Home",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Setări",confirmText:"View GooseMod Settings",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Setări-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimental Features",description:"Try out new experimental features"},{name:"Utilităţi",description:"Make backups, reset GooseMod, and more"},{name:"Ajustări",description:"Ajustează GooseMod cum vrei tu"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Comunitate",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ask Questions",description:"Ask any questions and get support"},{name:"Știri",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Get Involved",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Află mai multe",cancelText:"Not Interested",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Magazin",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Setări",description:"Find out about the settings for GooseMod and plugins"},{name:"Comunitate",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Plugin-uri"===e[1])),themes:e.settings.items.find((e=>"Teme"===e[1])),snippets:e.settings.items.find((e=>"Snippets"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teme"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teme","themes"),id:"gm-home-themes",text:"Teme",selected:!1})),c(t.createElement(a,{style:{display:S||"Plugin-uri"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Plugin-uri","plugins"),id:"gm-home-plugins",text:"Plugin-uri",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippets"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippets","snippets"),id:"gm-home-snippets",text:"Snippets",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippets"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Eliminați":"Adăugați",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Adăugați",s.buttonText="Adăugați",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Eliminați",s.buttonText="Eliminați",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Setări":o="settings";break;case"Plugin-uri":o="plugins";break;case"Teme":o="themes";break;case"Snippets":o="snippets";break;case"Jurnal de modificări":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Setări"),t?void 0:o("Plugin-uri"),t?void 0:o("Teme"),o("Jurnal de modificări")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Module GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Module GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Plugin-uri"===e[1]||"Teme"===e[1]||"Snippets"===e[1])||!t.snippets&&"Snippets"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Setări":o="settings";break;case"Plugin-uri":o="plugins";break;case"Teme":o="themes";break;case"Snippets":o="snippets";break;case"Jurnal de modificări":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Plugin-uri"!==t[1]&&"Teme"!==t[1]&&"Snippets"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Plugin-uri"!==e.target.textContent&&"Teme"!==e.target.textContent&&"Snippets"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Jurnal de modificări",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Module GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Setări",["",{type:"header",text:"Setări"},{type:"toggle",text:"Jurnal de modificări GooseMod",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Separatori Primari",subtext:"Afișează separatori între setările primare GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Store In Home",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Magazin"},{type:"toggle",text:"Actualizare automată",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Aspect"},{type:"toggle",text:"Insignele GooseMod",subtext:"Afișează insignele GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utilităţi"},{type:"text-and-button",text:"Ștergeți cache-urile",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Purge",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Începeți turul",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Copiază Informații Debug",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Copiază",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetează GooseMod",subtext:"Resetează GooseMod complet: șterge toate preferințe și modulele; ca instalarea inițială",buttonText:"Resetează",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Backup"},{type:"text-and-button",text:"Create Backup",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Backup",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Restore Backup",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Restore",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Ajustări",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Schimbări minore cum ar fi schimbări ale UI-ului pentru a face GooseMod pe placul tău"},{type:"toggle",text:"Placeholder Image",subtext:"Folosește o imagine înlocuitoare în Magazin pentru modulele fără imagini",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentale",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Setările experimentale sunt foarte posibil incomplete și instabile, ceea ce poate rezulta într-o experiență redusă"},{type:"toggle",experimental:!0,text:"Data Attributes",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Forțează Setările Temei",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stele",i="Toate",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Magazin":"Instalat";switch(r){case"A-Z":t.style.order="";break;case"Ultima actualizare":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stele":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Magazin"!==n&&n!==p||"Toate"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Magazin";"Magazin"!==n&&"Instalat"!==n&&(n="Magazin"),o.forEach(t);const a=""===d&&"Magazin"===n&&"Toate"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Nu s-au găsit rezultate"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Nu s-au găsit rezultate",""!==d&&"Magazin"===n&&"Toate"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nu s-au găsit rezultate, te-ai referit la plugin-uri?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Nu s-au găsit rezultate, te-ai referit la teme?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Toate temele"!==c.textContent&&"Toate plugin-urile"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Plugin-uri","Teme"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Căutați plugin-uri":"Căutați teme",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Filtrează după",options:["Stele","A-Z","Ultima actualizare"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Toate"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Stelate",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Actualizat Recent",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Toate plugin-urile":"Toate temele"},{type:"gm-footer"}]))),e.settings.createItem("Snippets",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Jurnal de modificări",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Module GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Plugin-uri"===e||"Teme"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teme":"Plugin-uri",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Magazinul GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Magazinul GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Magazinul GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Magazinul GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Eliminați",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Instalați",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Plugin-uri"===e[1]||"Teme"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Eliminați":"Instalați",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponsor GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Translator GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Dezvoltator GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Discord-ul Official GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Eliminați"===this.props.buttonText?"Instalați":"Eliminați",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teme"===e[1]))[2],d=goosemod.settings.items.find((e=>"Plugin-uri"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Module GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Deschide Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Eliminați"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Verificat PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP de neîncredere",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Fără PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Invalid Repo",{type:"error",timeout:5e3,subtext:"Format nevalid"});if(!confirm("Repositurile externe pot fi un risc de securitate deoarece nu sunt controlate de către dezvoltării GooseMod. Noi nu suntem responsabili de pericolele cauzate de către repositurile externe adăugate de utilizatori.\n\nDacă nu ai încredere în deținătorul acestui repo nu îl folosi deoarece îți poate compromite Discord-ul.\n\nConfirmă adăugarea acestui repo apăsând OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Untrusted Failure"})}},"Adăugați")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Magazin"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Instalat")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Reîmprospătați",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.ru.js b/goosemod.ru.js index 43954c06..0f4e5d5a 100644 --- a/goosemod.ru.js +++ b/goosemod.ru.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Темы",confirmText:"Взглянуть на темы",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Украсьте ваш Discord с помощью тем"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Выбирайте из более чем 100 тем, чтобы отрегулировать и улучшить Ваш пользовательский интерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плагины",confirmText:"Взглянуть на плагины",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прокачайте свой Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Плагины улучшают Ваш опыт пользования приложением за счёт всяких удобств"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Магазин",confirmText:"Заглянуть в магазин на главном экране",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Ищите темы и плагины в магазине"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod использует свой собственный магазин, в котором Вы легко можете найти и установить модули"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Настройки",confirmText:"Заглянуть в настройки GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Настройки-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Экспериментальное",description:"Попробуйте новые экспериментальные функции"},{name:"Утилиты",description:"Делайте резервные копии, сбрасывайте настройки GooseMod, и так далее"},{name:"Опции",description:"Отрегулируйте GooseMod как душе угодно"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Настройте GooseMod, чтобы подогнать функционал под себя"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Вы можете изменять много разных настроек"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Сообщество",confirmText:"Присоединиться к Discord-серверу GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Задавайте вопросы",description:"Задавайте любые вопросы и получите помощь"},{name:"Новости",description:"Оставайтесь в курсе новостей и анонсов, касающихся GooseMod и связанных проектов"},{name:"Участвуйте",description:"Предлагайте, помогайте другим, и так далее"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Вступить в сообщество GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Присоединяйтесь к нашему Discord-серверу для дополнительной информации"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Узнать больше",cancelText:"Не интересно",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Магазин",description:"Узнайте больше о магазине GooseMod и о том, что в нём есть"},{name:"Настройки",description:"Узнайте больше о настройках для GooseMod и плагинов"},{name:"Сообщество",description:"Присоединяйтесь к нашему Discord-серверу, чтобы задавать вопросы и быть в курсе последних новостей"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Узнайте больше о GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Пройти короткий тур по ключевым функциям GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плагины"===e[1])),themes:e.settings.items.find((e=>"Темы"===e[1])),snippets:e.settings.items.find((e=>"Сниппеты"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Темы"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Темы","themes"),id:"gm-home-themes",text:"Темы",selected:!1})),c(t.createElement(a,{style:{display:S||"Плагины"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плагины","plugins"),id:"gm-home-plugins",text:"Плагины",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Сниппеты"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Сниппеты","snippets"),id:"gm-home-snippets",text:"Сниппеты",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Сниппеты"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Удалить":"Добавить",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Добавить",s.buttonText="Добавить",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Удалить",s.buttonText="Удалить",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Настройки":o="settings";break;case"Плагины":o="plugins";break;case"Темы":o="themes";break;case"Сниппеты":o="snippets";break;case"Список изменений":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Настройки"),t?void 0:o("Плагины"),t?void 0:o("Темы"),o("Список изменений")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Модули GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Модули GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плагины"===e[1]||"Темы"===e[1]||"Сниппеты"===e[1])||!t.snippets&&"Сниппеты"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Настройки":o="settings";break;case"Плагины":o="plugins";break;case"Темы":o="themes";break;case"Сниппеты":o="snippets";break;case"Список изменений":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плагины"!==t[1]&&"Темы"!==t[1]&&"Сниппеты"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плагины"!==e.target.textContent&&"Темы"!==e.target.textContent&&"Сниппеты"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Список изменений",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Модули GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Перезагрузить","Требуется Перезагрузка","Эта настройка **требует перезагрузки для вступления в силу**. До перезагрузки вы **можете наблюдать странное поведение** во время сеанса.")&&location.reload()};e.settings.createItem("Настройки",["",{type:"header",text:"Настройки"},{type:"toggle",text:"Список изменений GooseMod",subtext:"Показывать кнопку просмотра списка изменений GooseMod в настройках",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Разделители в настройках",subtext:"Показывать разделители между вкладками настроек GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Магазин на главном экране",subtext:"Показывать магазин GooseMod на главном экране, а не в меню настроек",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Магазин"},{type:"toggle",text:"Автообновление",subtext:"Автоматически обновлять репозитории и модули каждый час",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Уведомления о новом модуле",subtext:"Показывать всплывающее уведомление каждый раз, когда новый модуль добавляется в Магазин",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Внешний вид"},{type:"toggle",text:"Значки GooseMod",subtext:"Показывать значки почёта пользователей GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Утилиты"},{type:"text-and-button",text:"Очистить кэш",subtext:"Очищает (полностью) почти все кэши, используемые GooseMod",buttonText:"Очистить",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Начать тур",subtext:"Пройти тур функционала GooseMod снова",buttonText:"Начать",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Скопировать отладочную информацию",subtext:"Копирует информацию об установке и GooseMod для отчётов и отладки",buttonText:"Скопировать",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Сбросить до заводских настроек",subtext:"Полностью сбрасывает настройки GooseMod: удаляет все изменения и модули, как при чистой установке",buttonText:"Сбросить",onclick:async()=>{await e.confirmDialog("Сбросить","Сбросить GooseMod","Сбрасывание настроек GooseMod удаляет все изменения и модули, как при чистой установке. Сброс является необратимым.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервное копирование"},{type:"text-and-button",text:"Создать резервную копию",subtext:"Создаёт файл с резервной копией Ваших модулей и настроек GooseMod",buttonText:"Создать",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Восстановить резервную копию",subtext:"Восстанавливает ваши модули и настройки GooseMod из файла резервной копии, **восстанавливайте только доверенные резервные копии**",buttonText:"Восстановить",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Интерфейс",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Небольшие изменения, как, например, изменения интерфейса, чтобы GooseMod выглядел так, как Вы желаете"},{type:"toggle",text:"Изображение по умолчанию",subtext:"Использовать изображение-заглушку в Магазине для модулей без изображений",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Складывающаяся категория на главном экране",subtext:"Позволяет скрывать категорию на главном экране нажатием по иконке",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Экспериментальное",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Экспериментальные настройки, скорее всего, не закончены и нестабильны, что может ухудшить впечатления"},{type:"toggle",experimental:!0,text:"Атрибуты данных",subtext:"Добавляет атрибуты данных к некоторым элементам, использующиеся некоторыми темами",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Сниппеты",subtext:"Включить вкладку сниппетов в магазине",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Принудительно использовать настройки тем",subtext:"Принудительно использовать автоматически сгенерированные настройки для всех тем",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="По рейтингу",i="Все",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Магазин":"Установленные";switch(r){case"По алфавиту":t.style.order="";break;case"По дате обновления":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"По рейтингу":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Магазин"!==n&&n!==p||"Все"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Магазин";"Магазин"!==n&&"Установленные"!==n&&(n="Магазин"),o.forEach(t);const a=""===d&&"Магазин"===n&&"Все"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ничего не найдено"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ничего не найдено",""!==d&&"Магазин"===n&&"Все"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ничего не найдено, возможно Вы имели в виду плагины?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ничего не найдено, возможно Вы имели в виду темы?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Все темы"!==c.textContent&&"Все плагины"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плагины","Темы"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Искать плагины":"Искать темы",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортировка",options:["По рейтингу","По алфавиту","По дате обновления"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Все"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Популярное",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Недавно обновлённое",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Все плагины":"Все темы"},{type:"gm-footer"}]))),e.settings.createItem("Сниппеты",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Список изменений",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Модули GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плагины"===e||"Темы"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Темы":"Плагины",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Магазин GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Магазин GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Магазин GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Магазин GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Удалить",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Установить",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плагины"===e[1]||"Темы"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Удалить":"Установить",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Спонсор GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Переводчик GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Разработчик GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Официальный сервер GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Удалить"===this.props.buttonText?"Установить":"Удалить",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Темы"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плагины"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Модули GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Открыть ссылку"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Удалить"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Подтверждено PGP подписью",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Не подтверждено PGP подписью",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP подпись отсутствует",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозитории"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Неверная ссылка или репозиторий",{type:"error",timeout:5e3,subtext:"Недопустимый формат ссылки"});if(!confirm("Внешние репозитории представляют угрозу безопасности, так как они не управляются разработчиками GooseMod. Мы не несём ответственность за любые опасности из-за добавления внешних репозиториев пользователями.\n\nЕсли Вы не доверяете владельцу этого репозитория, не используйте его, так как это может поставить под угрозу ваш клиент Discord.\n\nПожалуйста, подтвердите добавление этого репозитория нажатием \"OK\"."))return void goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Отклонено оповещение о безопасности"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Этот репозиторий неизвестен и не подтверждён (отсутствует PGP), пожалуйста, будьте очень осторожны. Удостоверьтесь в том, что Вы можете полностью доверять владельцу(-ам) репозитория.\n\nЧтобы исправить эту проблему, попросите владельца репозитория добавить поддержку PGP.\n\nПожалуйста, подтвердите добавление этого репозитория нажатием \"OK\".")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Отклонено оповещение о безопасности"}):goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Ошибка подтверждения PGP"})}},"Добавить")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Магазин"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Установленные")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Обновить",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозитории",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Темы",confirmText:"Взглянуть на темы",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Украсьте ваш Discord с помощью тем"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Выбирайте из более чем 100 тем, чтобы отрегулировать и улучшить Ваш пользовательский интерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плагины",confirmText:"Взглянуть на плагины",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прокачайте свой Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Плагины улучшают Ваш опыт пользования приложением за счёт всяких удобств"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Магазин",confirmText:"Заглянуть в магазин на главном экране",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Ищите темы и плагины в магазине"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod использует свой собственный магазин, в котором Вы легко можете найти и установить модули"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Настройки",confirmText:"Заглянуть в настройки GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Настройки-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Экспериментальное",description:"Попробуйте новые экспериментальные функции"},{name:"Утилиты",description:"Делайте резервные копии, сбрасывайте настройки GooseMod, и так далее"},{name:"Опции",description:"Отрегулируйте GooseMod как душе угодно"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Настройте GooseMod, чтобы подогнать функционал под себя"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Вы можете изменять много разных настроек"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Сообщество",confirmText:"Присоединиться к Discord-серверу GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Задавайте вопросы",description:"Задавайте любые вопросы и получите помощь"},{name:"Новости",description:"Оставайтесь в курсе новостей и анонсов, касающихся GooseMod и связанных проектов"},{name:"Участвуйте",description:"Предлагайте, помогайте другим, и так далее"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Вступить в сообщество GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Присоединяйтесь к нашему Discord-серверу для дополнительной информации"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Узнать больше",cancelText:"Не интересно",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Магазин",description:"Узнайте больше о магазине GooseMod и о том, что в нём есть"},{name:"Настройки",description:"Узнайте больше о настройках для GooseMod и плагинов"},{name:"Сообщество",description:"Присоединяйтесь к нашему Discord-серверу, чтобы задавать вопросы и быть в курсе последних новостей"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Узнайте больше о GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Пройти короткий тур по ключевым функциям GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плагины"===e[1])),themes:e.settings.items.find((e=>"Темы"===e[1])),snippets:e.settings.items.find((e=>"Сниппеты"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Темы"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Темы","themes"),id:"gm-home-themes",text:"Темы",selected:!1})),c(t.createElement(a,{style:{display:S||"Плагины"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плагины","plugins"),id:"gm-home-plugins",text:"Плагины",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Сниппеты"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Сниппеты","snippets"),id:"gm-home-snippets",text:"Сниппеты",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Сниппеты"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Удалить":"Добавить",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Добавить",s.buttonText="Добавить",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Удалить",s.buttonText="Удалить",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Настройки":o="settings";break;case"Плагины":o="plugins";break;case"Темы":o="themes";break;case"Сниппеты":o="snippets";break;case"Список изменений":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Настройки"),t?void 0:o("Плагины"),t?void 0:o("Темы"),o("Список изменений")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Модули GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Модули GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плагины"===e[1]||"Темы"===e[1]||"Сниппеты"===e[1])||!t.snippets&&"Сниппеты"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Настройки":o="settings";break;case"Плагины":o="plugins";break;case"Темы":o="themes";break;case"Сниппеты":o="snippets";break;case"Список изменений":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плагины"!==t[1]&&"Темы"!==t[1]&&"Сниппеты"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плагины"!==e.target.textContent&&"Темы"!==e.target.textContent&&"Сниппеты"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Список изменений",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Модули GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Перезагрузить","Требуется Перезагрузка","Эта настройка **требует перезагрузки для вступления в силу**. До перезагрузки вы **можете наблюдать странное поведение** во время сеанса.")&&location.reload()};e.settings.createItem("Настройки",["",{type:"header",text:"Настройки"},{type:"toggle",text:"Список изменений GooseMod",subtext:"Показывать кнопку просмотра списка изменений GooseMod в настройках",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Разделители в настройках",subtext:"Показывать разделители между вкладками настроек GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Магазин на главном экране",subtext:"Показывать магазин GooseMod на главном экране, а не в меню настроек",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Магазин"},{type:"toggle",text:"Автообновление",subtext:"Автоматически обновлять репозитории и модули каждый час",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Уведомления о новом модуле",subtext:"Показывать всплывающее уведомление каждый раз, когда новый модуль добавляется в Магазин",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Внешний вид"},{type:"toggle",text:"Значки GooseMod",subtext:"Показывать значки почёта пользователей GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Утилиты"},{type:"text-and-button",text:"Очистить кэш",subtext:"Очищает (полностью) почти все кэши, используемые GooseMod",buttonText:"Очистить",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Начать тур",subtext:"Пройти тур функционала GooseMod снова",buttonText:"Начать",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Скопировать отладочную информацию",subtext:"Копирует информацию об установке и GooseMod для отчётов и отладки",buttonText:"Скопировать",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Сбросить до заводских настроек",subtext:"Полностью сбрасывает настройки GooseMod: удаляет все изменения и модули, как при чистой установке",buttonText:"Сбросить",onclick:async()=>{await e.confirmDialog("Сбросить","Сбросить GooseMod","Сбрасывание настроек GooseMod удаляет все изменения и модули, как при чистой установке. Сброс является необратимым.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервное копирование"},{type:"text-and-button",text:"Создать резервную копию",subtext:"Создаёт файл с резервной копией Ваших модулей и настроек GooseMod",buttonText:"Создать",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Восстановить резервную копию",subtext:"Восстанавливает ваши модули и настройки GooseMod из файла резервной копии, **восстанавливайте только доверенные резервные копии**",buttonText:"Восстановить",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Интерфейс",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Небольшие изменения, как, например, изменения интерфейса, чтобы GooseMod выглядел так, как Вы желаете"},{type:"toggle",text:"Изображение по умолчанию",subtext:"Использовать изображение-заглушку в Магазине для модулей без изображений",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Складывающаяся категория на главном экране",subtext:"Позволяет скрывать категорию на главном экране нажатием по иконке",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Экспериментальное",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Экспериментальные настройки, скорее всего, не закончены и нестабильны, что может ухудшить впечатления"},{type:"toggle",experimental:!0,text:"Атрибуты данных",subtext:"Добавляет атрибуты данных к некоторым элементам, использующиеся некоторыми темами",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Сниппеты",subtext:"Включить вкладку сниппетов в магазине",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Принудительно использовать настройки тем",subtext:"Принудительно использовать автоматически сгенерированные настройки для всех тем",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="По рейтингу",i="Все",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Магазин":"Установленные";switch(r){case"По алфавиту":t.style.order="";break;case"По дате обновления":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"По рейтингу":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Магазин"!==n&&n!==p||"Все"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Магазин";"Магазин"!==n&&"Установленные"!==n&&(n="Магазин"),o.forEach(t);const a=""===d&&"Магазин"===n&&"Все"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Ничего не найдено"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Ничего не найдено",""!==d&&"Магазин"===n&&"Все"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ничего не найдено, возможно Вы имели в виду плагины?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Ничего не найдено, возможно Вы имели в виду темы?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Все темы"!==c.textContent&&"Все плагины"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плагины","Темы"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Искать плагины":"Искать темы",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортировка",options:["По рейтингу","По алфавиту","По дате обновления"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Все"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Популярное",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Недавно обновлённое",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Все плагины":"Все темы"},{type:"gm-footer"}]))),e.settings.createItem("Сниппеты",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Список изменений",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Модули GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плагины"===e||"Темы"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Темы":"Плагины",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Магазин GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Магазин GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Магазин GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Магазин GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Удалить",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Установить",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плагины"===e[1]||"Темы"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Удалить":"Установить",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Спонсор GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Переводчик GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Разработчик GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Официальный сервер GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Удалить"===this.props.buttonText?"Установить":"Удалить",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Темы"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плагины"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Модули GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Открыть ссылку"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Удалить"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="Подтверждено PGP подписью",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Не подтверждено PGP подписью",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP подпись отсутствует",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозитории"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Неверная ссылка или репозиторий",{type:"error",timeout:5e3,subtext:"Недопустимый формат ссылки"});if(!confirm("Внешние репозитории представляют угрозу безопасности, так как они не управляются разработчиками GooseMod. Мы не несём ответственность за любые опасности из-за добавления внешних репозиториев пользователями.\n\nЕсли Вы не доверяете владельцу этого репозитория, не используйте его, так как это может поставить под угрозу ваш клиент Discord.\n\nПожалуйста, подтвердите добавление этого репозитория нажатием \"OK\"."))return void goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Отклонено оповещение о безопасности"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Этот репозиторий неизвестен и не подтверждён (отсутствует PGP), пожалуйста, будьте очень осторожны. Удостоверьтесь в том, что Вы можете полностью доверять владельцу(-ам) репозитория.\n\nЧтобы исправить эту проблему, попросите владельца репозитория добавить поддержку PGP.\n\nПожалуйста, подтвердите добавление этого репозитория нажатием \"OK\".")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Отклонено оповещение о безопасности"}):goosemod.showToast("Добавление репозитория отменено",{type:"danger",timeout:5e3,subtext:"Ошибка подтверждения PGP"})}},"Добавить")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Магазин"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Установленные")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Обновить",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозитории",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.sk.js b/goosemod.sk.js index c18b9914..4a792f2a 100644 --- a/goosemod.sk.js +++ b/goosemod.sk.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témy",confirmText:"Prezerať Témy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Skrášlite svoj Discord s Témami"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Vyberte si z viac ako 100 tém na vyladenie a vylepšenie používateľského rozhrania"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Prezerať Pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Vylepšite si svoj Discord pod kapotou"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy zlepšujú Vaše skúsenosti s vylepšeniami v samotnej aplikácii"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Obchod",confirmText:"Zobraziť Obchod v karte Domov",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Prezerajte si Témy a Pluginy v Obchode"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod používa svoj vlastný Obchod, kde si môžete ľahko prezerať a inštalovať modifikácie"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nastavenia",confirmText:"Zobraziť nastavenia GooseModu",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nastavenia-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentálne Funkcie",description:"Vyskúšajte nové experimentálne funkcie"},{name:"Utility",description:"Vytvoriť zálohy, resetovať GooseMod, a viac"},{name:"Vyladenia",description:"Vylaďte si GooseMod tak, ako Vy chcete"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Použiť nastavenia GooseModu pre prispôsobenie jeho funkcii"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Existujú rôzne možnosti ktoré môžete zmeniť"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Komunita",confirmText:"Pripojte sa k Discord Serveru GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Pýtať sa otázky",description:"Pýtajte sa hocijaké otázky a získajte podporu"},{name:"Novinky",description:"Získať najnovšie novinky a oznámenia okolo GooseModu a súvisiacich projektoch"},{name:"Zapojte sa",description:"Pomôžte s návrhmi, podporou ostatných, a viac"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Pripojiť sa ku Komunite GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pripojte sa k našému Discordu pre viac informácií, a viac"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Zistiť viac",cancelText:"Nezaujíma ma",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Obchod",description:"Zistiť viac o Obchodu GooseMod a čo je v ňom"},{name:"Nastavenia",description:"Zistiť o nastaveniach GooseModu a pluginov"},{name:"Komunita",description:"Pridajte sa k našému Discordu a pýtajte sa otázky, dajte nám spätnú väzbu, zostaňte aktuálny z novinkami, a viac"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zistiť viac o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Prejdite cez krátku prehliadku základných funkciách GooseModu"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Témy"===e[1])),snippets:e.settings.items.find((e=>"Snippety"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témy","themes"),id:"gm-home-themes",text:"Témy",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippety"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippety","snippets"),id:"gm-home-snippets",text:"Snippety",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippety"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Odstrániť":"Pridať",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Pridať",s.buttonText="Pridať",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Odstrániť",s.buttonText="Odstrániť",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nastavenia":o="settings";break;case"Pluginy":o="plugins";break;case"Témy":o="themes";break;case"Snippety":o="snippets";break;case"Zoznam zmien":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nastavenia"),t?void 0:o("Pluginy"),t?void 0:o("Témy"),o("Zoznam zmien")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduly GooseModu",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduly GooseModu"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Témy"===e[1]||"Snippety"===e[1])||!t.snippets&&"Snippety"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nastavenia":o="settings";break;case"Pluginy":o="plugins";break;case"Témy":o="themes";break;case"Snippety":o="snippets";break;case"Zoznam zmien":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Témy"!==t[1]&&"Snippety"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Témy"!==e.target.textContent&&"Snippety"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Zoznam zmien",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduly GooseModu"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Obnoviť","Potrebné obnovenie","Toto nastavenie **potrebuje obnovenie aby malo účinok**. Môžete **vidieť zvláštne správanie** pred obnovením.")&&location.reload()};e.settings.createItem("Nastavenia",["",{type:"header",text:"Nastavenia"},{type:"toggle",text:"GooseMod Zoznam Zmien",subtext:"Zobraziť GooseMod \"Zoznam Zmien\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hlavné Oddeľovače",subtext:"Zobraziť oddeľovače medzi hlavnými nastaveniami GooseModu",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Obchod v karte domov",subtext:"Presunúť nastavenia Obchodu GooseMod do karty domov namiesto nastavení",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Obchod"},{type:"toggle",text:"Automatické aktualizácie",subtext:"Automaticky aktualizovať repozitáre a moduly každú hodinu",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notifikácie pre nové Moduly",subtext:"Zobrazí toast notifikáciu vždy keď je pridaný nový modul do Obchodu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Vzhľad"},{type:"toggle",text:"GooseMod Odznaky",subtext:"Zobrazí GooseMod odznaky",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utility"},{type:"text-and-button",text:"Zmazať dočasné súbory GooseModu",subtext:"Zmaže vetšinu dočasných súborov ktoré GooseMod používa",buttonText:"Vymazať dočasné súbory",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Spustiť prehliadku",subtext:"Znovu prejsť cez začiatočnú prehliadku GooseModu",buttonText:"Prehliadka",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopírovať ladiace informácie",subtext:"Kopíruje informácie o nastavení a GooseModu pre hlásenie a ladenie",buttonText:"Kopírovať",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetovať GooseMod",subtext:"Kompletne zresetuje GooseMod: odstraní všetky nastavenia a moduly; ako keby ste GooseMod nainštalovali po prvý krát",buttonText:"Resetovať",onclick:async()=>{await e.confirmDialog("Resetovať","Resetovať GooseMod","Potvrdením kompletne zresetujete GooseMod, vymažete všetky nastavenia a moduly; ako keby ste nainštalovali GooseMod po prvý krát. Toto sa nedá vrátiť.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Záloha"},{type:"text-and-button",text:"Vytvoriť zálohu",subtext:"Vytvorí zálohu pre Vaše GooseMod moduly a nastavenia",buttonText:"Záloha",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnoviť zo Zálohy",subtext:"Obnoví Vaše GooseMod moduly a nastavenia zo súboru zálohy, **obnovujte iba zálohy ktorým veríte**",buttonText:"Obnoviť",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Vyladenia",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Menšie zmeny ako napríklad, malé úpravy UI aby GooseMod bol taký, ako ho máte radi"},{type:"toggle",text:"Zástupný Obrázok",subtext:"Použiť zástupný obrázok v Obchode pre moduly bez obrázkov",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Skladacia kategória Domov",subtext:"Umožnite zbalenie kategórie domov pomocou ikony",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentálne",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentálne nastavenia pravdepodobne nie sú hotové a môžu byť nestabilné, kvôli tomu môžu spôsobiť zhoršené skúsenosti pri použivaní GooseModu"},{type:"toggle",experimental:!0,text:"Atribúty dát",subtext:"Pridať atribúty dát k niektorým elementom pre použitie niektorými témami",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippety",subtext:"Zapnúť tab Snippety v Obchode",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Nasilu použiť Nastavenia Témy",subtext:"Nasilu použiť automaticky generované nastavenia pre všetky témy",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Hviezdy",i="Všetko",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Obchod":"Nainštalované";switch(r){case"A-Z":t.style.order="";break;case"Posledne aktualizované":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Hviezdy":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Obchod"!==n&&n!==p||"Všetko"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Obchod";"Obchod"!==n&&"Nainštalované"!==n&&(n="Obchod"),o.forEach(t);const a=""===d&&"Obchod"===n&&"Všetko"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Neboli nájdené žiadne výsledky"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Neboli nájdené žiadne výsledky",""!==d&&"Obchod"===n&&"Všetko"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Neboli nájdené žiadne výsledky, nechceli ste náhodou hľadať v pluginoch?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Neboli nájdené žiadne výsledky, nechceli ste náhodou hľadať v témach?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Všetky Témy"!==c.textContent&&"Všetky Pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Témy"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hľadať Pluginy":"Hľadať Témy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Zoradiť",options:["Hviezdy","A-Z","Posledne aktualizované"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Všetko"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"S najviac hviezdami",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nedávno aktualizované",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Všetky Pluginy":"Všetky Témy"},{type:"gm-footer"}]))),e.settings.createItem("Snippety",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Zoznam zmien",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduly GooseModu"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Témy"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témy":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Obchod GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Obchod GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Odstrániť",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Inštalovať",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Témy"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Odstrániť":"Inštalovať",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponzor GooseModu","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Prekladateľ GooseModu","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Vývojár GooseModu","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Oficiálny Discord GooseModu","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Odstrániť"===this.props.buttonText?"Inštalovať":"Odstrániť",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témy"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduly GooseModu")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otvoriť Odkaz"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Odstrániť"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Overené",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Nedôveryhodné",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Žiadne PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitáre"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neplatný repozitár",{type:"error",timeout:5e3,subtext:"Neplatný formát"});if(!confirm("Vonkajšie repozitáre môžu predstavovať bezpečnostné riziká pretože nie sú kontrolované vývojármi GooseModu. Nenesieme zodpovednosť za žiadne nebezpečenstva z dôvodu vonkajších repozitárov pridanými užívateľmi.\n\nAk neveríte majiteľovi tejto repozitáre tak ho nepoužívajte pretože by mohlo dojsť k prelomeniu zabezpečenia Vašej inštalácie Discordu.\n\nProsím potvrďte pridanie tejto repozitáre kliknutím na tlačítko OK."))return void goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Odmietnutá bezpečnostná výzva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tento repozitár nie je známy ani overený (žiadne overenie PGP), prosím buďte extra opatrní. Uistite sa že veríte majiteľom tejto repozitáre.\n\nPre vyriešenie tohto problému kontaktujte vlastníka repozitáre aby pridal podporu PGP.\n\nProsím znovu potvrďte pridanie tohto repozitára kliknutím na tlačítko OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Odmietnutá bezpečnostná výzva"}):goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Nedôveryhodné PGP"})}},"Pridať")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Obchod"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Nainštalované")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Obnoviť",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitáre",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Témy",confirmText:"Prezerať Témy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Skrášlite svoj Discord s Témami"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Vyberte si z viac ako 100 tém na vyladenie a vylepšenie používateľského rozhrania"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Pluginy",confirmText:"Prezerať Pluginy",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Vylepšite si svoj Discord pod kapotou"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pluginy zlepšujú Vaše skúsenosti s vylepšeniami v samotnej aplikácii"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Obchod",confirmText:"Zobraziť Obchod v karte Domov",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Prezerajte si Témy a Pluginy v Obchode"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod používa svoj vlastný Obchod, kde si môžete ľahko prezerať a inštalovať modifikácie"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Nastavenia",confirmText:"Zobraziť nastavenia GooseModu",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Nastavenia-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentálne Funkcie",description:"Vyskúšajte nové experimentálne funkcie"},{name:"Utility",description:"Vytvoriť zálohy, resetovať GooseMod, a viac"},{name:"Vyladenia",description:"Vylaďte si GooseMod tak, ako Vy chcete"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Použiť nastavenia GooseModu pre prispôsobenie jeho funkcii"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Existujú rôzne možnosti ktoré môžete zmeniť"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Komunita",confirmText:"Pripojte sa k Discord Serveru GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Pýtať sa otázky",description:"Pýtajte sa hocijaké otázky a získajte podporu"},{name:"Novinky",description:"Získať najnovšie novinky a oznámenia okolo GooseModu a súvisiacich projektoch"},{name:"Zapojte sa",description:"Pomôžte s návrhmi, podporou ostatných, a viac"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Pripojiť sa ku Komunite GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pripojte sa k našému Discordu pre viac informácií, a viac"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Zistiť viac",cancelText:"Nezaujíma ma",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Obchod",description:"Zistiť viac o Obchodu GooseMod a čo je v ňom"},{name:"Nastavenia",description:"Zistiť o nastaveniach GooseModu a pluginov"},{name:"Komunita",description:"Pridajte sa k našému Discordu a pýtajte sa otázky, dajte nám spätnú väzbu, zostaňte aktuálny z novinkami, a viac"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Zistiť viac o GooseModu"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Prejdite cez krátku prehliadku základných funkciách GooseModu"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Pluginy"===e[1])),themes:e.settings.items.find((e=>"Témy"===e[1])),snippets:e.settings.items.find((e=>"Snippety"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Témy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Témy","themes"),id:"gm-home-themes",text:"Témy",selected:!1})),c(t.createElement(a,{style:{display:S||"Pluginy"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Pluginy","plugins"),id:"gm-home-plugins",text:"Pluginy",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippety"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippety","snippets"),id:"gm-home-snippets",text:"Snippety",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippety"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Odstrániť":"Pridať",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Pridať",s.buttonText="Pridať",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Odstrániť",s.buttonText="Odstrániť",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Nastavenia":o="settings";break;case"Pluginy":o="plugins";break;case"Témy":o="themes";break;case"Snippety":o="snippets";break;case"Zoznam zmien":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Nastavenia"),t?void 0:o("Pluginy"),t?void 0:o("Témy"),o("Zoznam zmien")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Moduly GooseModu",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Moduly GooseModu"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Pluginy"===e[1]||"Témy"===e[1]||"Snippety"===e[1])||!t.snippets&&"Snippety"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Nastavenia":o="settings";break;case"Pluginy":o="plugins";break;case"Témy":o="themes";break;case"Snippety":o="snippets";break;case"Zoznam zmien":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Pluginy"!==t[1]&&"Témy"!==t[1]&&"Snippety"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Pluginy"!==e.target.textContent&&"Témy"!==e.target.textContent&&"Snippety"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Zoznam zmien",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Moduly GooseModu"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Obnoviť","Potrebné obnovenie","Toto nastavenie **potrebuje obnovenie aby malo účinok**. Môžete **vidieť zvláštne správanie** pred obnovením.")&&location.reload()};e.settings.createItem("Nastavenia",["",{type:"header",text:"Nastavenia"},{type:"toggle",text:"GooseMod Zoznam Zmien",subtext:"Zobraziť GooseMod \"Zoznam Zmien\"",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Hlavné Oddeľovače",subtext:"Zobraziť oddeľovače medzi hlavnými nastaveniami GooseModu",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Obchod v karte domov",subtext:"Presunúť nastavenia Obchodu GooseMod do karty domov namiesto nastavení",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Obchod"},{type:"toggle",text:"Automatické aktualizácie",subtext:"Automaticky aktualizovať repozitáre a moduly každú hodinu",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Notifikácie pre nové Moduly",subtext:"Zobrazí toast notifikáciu vždy keď je pridaný nový modul do Obchodu",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Vzhľad"},{type:"toggle",text:"GooseMod Odznaky",subtext:"Zobrazí GooseMod odznaky",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Utility"},{type:"text-and-button",text:"Zmazať dočasné súbory GooseModu",subtext:"Zmaže vetšinu dočasných súborov ktoré GooseMod používa",buttonText:"Vymazať dočasné súbory",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Spustiť prehliadku",subtext:"Znovu prejsť cez začiatočnú prehliadku GooseModu",buttonText:"Prehliadka",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopírovať ladiace informácie",subtext:"Kopíruje informácie o nastavení a GooseModu pre hlásenie a ladenie",buttonText:"Kopírovať",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Resetovať GooseMod",subtext:"Kompletne zresetuje GooseMod: odstraní všetky nastavenia a moduly; ako keby ste GooseMod nainštalovali po prvý krát",buttonText:"Resetovať",onclick:async()=>{await e.confirmDialog("Resetovať","Resetovať GooseMod","Potvrdením kompletne zresetujete GooseMod, vymažete všetky nastavenia a moduly; ako keby ste nainštalovali GooseMod po prvý krát. Toto sa nedá vrátiť.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Záloha"},{type:"text-and-button",text:"Vytvoriť zálohu",subtext:"Vytvorí zálohu pre Vaše GooseMod moduly a nastavenia",buttonText:"Záloha",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Obnoviť zo Zálohy",subtext:"Obnoví Vaše GooseMod moduly a nastavenia zo súboru zálohy, **obnovujte iba zálohy ktorým veríte**",buttonText:"Obnoviť",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Vyladenia",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Menšie zmeny ako napríklad, malé úpravy UI aby GooseMod bol taký, ako ho máte radi"},{type:"toggle",text:"Zástupný Obrázok",subtext:"Použiť zástupný obrázok v Obchode pre moduly bez obrázkov",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Skladacia kategória Domov",subtext:"Umožnite zbalenie kategórie domov pomocou ikony",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentálne",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimentálne nastavenia pravdepodobne nie sú hotové a môžu byť nestabilné, kvôli tomu môžu spôsobiť zhoršené skúsenosti pri použivaní GooseModu"},{type:"toggle",experimental:!0,text:"Atribúty dát",subtext:"Pridať atribúty dát k niektorým elementom pre použitie niektorými témami",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippety",subtext:"Zapnúť tab Snippety v Obchode",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Nasilu použiť Nastavenia Témy",subtext:"Nasilu použiť automaticky generované nastavenia pre všetky témy",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Hviezdy",i="Všetko",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Obchod":"Nainštalované";switch(r){case"A-Z":t.style.order="";break;case"Posledne aktualizované":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Hviezdy":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Obchod"!==n&&n!==p||"Všetko"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Obchod";"Obchod"!==n&&"Nainštalované"!==n&&(n="Obchod"),o.forEach(t);const a=""===d&&"Obchod"===n&&"Všetko"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Neboli nájdené žiadne výsledky"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Neboli nájdené žiadne výsledky",""!==d&&"Obchod"===n&&"Všetko"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Neboli nájdené žiadne výsledky, nechceli ste náhodou hľadať v pluginoch?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Neboli nájdené žiadne výsledky, nechceli ste náhodou hľadať v témach?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Všetky Témy"!==c.textContent&&"Všetky Pluginy"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Pluginy","Témy"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Hľadať Pluginy":"Hľadať Témy",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Zoradiť",options:["Hviezdy","A-Z","Posledne aktualizované"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Autor",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Všetko"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"S najviac hviezdami",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nedávno aktualizované",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Všetky Pluginy":"Všetky Témy"},{type:"gm-footer"}]))),e.settings.createItem("Snippety",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Zoznam zmien",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Moduly GooseModu"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Pluginy"===e||"Témy"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Témy":"Pluginy",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Obchod GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Obchod GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Obchod GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Odstrániť",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Inštalovať",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Pluginy"===e[1]||"Témy"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Odstrániť":"Inštalovať",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Sponzor GooseModu","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Prekladateľ GooseModu","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Vývojár GooseModu","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Oficiálny Discord GooseModu","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Odstrániť"===this.props.buttonText?"Inštalovať":"Odstrániť",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Témy"===e[1]))[2],d=goosemod.settings.items.find((e=>"Pluginy"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Moduly GooseModu")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Otvoriť Odkaz"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Odstrániť"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Overené",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Nedôveryhodné",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Žiadne PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repozitáre"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Neplatný repozitár",{type:"error",timeout:5e3,subtext:"Neplatný formát"});if(!confirm("Vonkajšie repozitáre môžu predstavovať bezpečnostné riziká pretože nie sú kontrolované vývojármi GooseModu. Nenesieme zodpovednosť za žiadne nebezpečenstva z dôvodu vonkajších repozitárov pridanými užívateľmi.\n\nAk neveríte majiteľovi tejto repozitáre tak ho nepoužívajte pretože by mohlo dojsť k prelomeniu zabezpečenia Vašej inštalácie Discordu.\n\nProsím potvrďte pridanie tejto repozitáre kliknutím na tlačítko OK."))return void goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Odmietnutá bezpečnostná výzva"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Tento repozitár nie je známy ani overený (žiadne overenie PGP), prosím buďte extra opatrní. Uistite sa že veríte majiteľom tejto repozitáre.\n\nPre vyriešenie tohto problému kontaktujte vlastníka repozitáre aby pridal podporu PGP.\n\nProsím znovu potvrďte pridanie tohto repozitára kliknutím na tlačítko OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Odmietnutá bezpečnostná výzva"}):goosemod.showToast("Pridanie repozitáre bolo zrušené",{type:"danger",timeout:5e3,subtext:"Nedôveryhodné PGP"})}},"Pridať")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Obchod"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Nainštalované")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Obnoviť",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repozitáre",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.sv-SE.js b/goosemod.sv-SE.js index a01ef034..841a2f81 100644 --- a/goosemod.sv-SE.js +++ b/goosemod.sv-SE.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teman",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Insticksprogram",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butik",confirmText:"Visa butik i hem",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Inställningar",confirmText:"Visa GooseMod inställningar",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Inställningar-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentella funktioner",description:"Prova nya experimentella funktioner"},{name:"Verktyg",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemenskap",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ställ frågor",description:"Ask any questions and get support"},{name:"Nyheter",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Bli involverad",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Läs mer",cancelText:"Inte Intresserad",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butik",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Inställningar",description:"Find out about the settings for GooseMod and plugins"},{name:"Gemenskap",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Insticksprogram"===e[1])),themes:e.settings.items.find((e=>"Teman"===e[1])),snippets:e.settings.items.find((e=>"Snuttar"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teman"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teman","themes"),id:"gm-home-themes",text:"Teman",selected:!1})),c(t.createElement(a,{style:{display:S||"Insticksprogram"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Insticksprogram","plugins"),id:"gm-home-plugins",text:"Insticksprogram",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snuttar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snuttar","snippets"),id:"gm-home-snippets",text:"Snuttar",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snuttar"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Ta bort":"Lägg till",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Lägg till",s.buttonText="Lägg till",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Ta bort",s.buttonText="Ta bort",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Inställningar":o="settings";break;case"Insticksprogram":o="plugins";break;case"Teman":o="themes";break;case"Snuttar":o="snippets";break;case"Ändringslogg":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Inställningar"),t?void 0:o("Insticksprogram"),t?void 0:o("Teman"),o("Ändringslogg")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Insticksprogram"===e[1]||"Teman"===e[1]||"Snuttar"===e[1])||!t.snippets&&"Snuttar"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Inställningar":o="settings";break;case"Insticksprogram":o="plugins";break;case"Teman":o="themes";break;case"Snuttar":o="snippets";break;case"Ändringslogg":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Insticksprogram"!==t[1]&&"Teman"!==t[1]&&"Snuttar"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Insticksprogram"!==e.target.textContent&&"Teman"!==e.target.textContent&&"Snuttar"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Ändringslogg",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Inställningar",["",{type:"header",text:"Inställningar"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butik i hem",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butik"},{type:"toggle",text:"Automatisk uppdatering",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Utseende"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Verktyg"},{type:"text-and-button",text:"Rensa cacher",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Rensa",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiera Debuginfo",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Kopiera",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Återställ GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Återställ",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Säkerhetskopiering"},{type:"text-and-button",text:"Skapa säkerhetskopia",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Säkerhetskopia",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Återställ säkerhetskopia",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Återställ",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentell",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Dataattribut",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Tvinga temainställningar",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjärnor",i="Alla",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butik":"Installerad";switch(r){case"A-Z":t.style.order="";break;case"Senast uppdaterad":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjärnor":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butik"!==n&&n!==p||"Alla"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butik";"Butik"!==n&&"Installerad"!==n&&(n="Butik"),o.forEach(t);const a=""===d&&"Butik"===n&&"Alla"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Inga resultat hittades"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Inga resultat hittades",""!==d&&"Butik"===n&&"Alla"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Inga resultat hittades, menade du insticksprogram?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Inga resultat hittades, menade du teman?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alla teman"!==c.textContent&&"Alla insticksprogram"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Insticksprogram","Teman"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Sök efter insticksprogram":"Sök efter teman",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortera efter",options:["Stjärnor","A-Z","Senast uppdaterad"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Författare",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alla"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nyligen uppdaterade",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alla insticksprogram":"Alla teman"},{type:"gm-footer"}]))),e.settings.createItem("Snuttar",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Ändringslogg",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Insticksprogram"===e||"Teman"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teman":"Insticksprogram",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod butik"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod butik"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod butik"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod butik"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Ta bort",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installera",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Insticksprogram"===e[1]||"Teman"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Ta bort":"Installera",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Översättare","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Utvecklare","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Ta bort"===this.props.buttonText?"Installera":"Ta bort",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teman"===e[1]))[2],d=goosemod.settings.items.find((e=>"Insticksprogram"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Ta bort"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verifierad",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Otillförlitlig",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ogiltigt filförråd",{type:"error",timeout:5e3,subtext:"Ogiltigt format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Otillförlitligt misslyckande"})}},"Lägg till")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butik"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installerad")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Uppdatera",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Teman",confirmText:"Browse Themes",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Beautify your Discord with Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Pick from over 100 themes to tweak and enhance your user interface"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Insticksprogram",confirmText:"Browse Plugins",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Amplify your Discord under the hood"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Plugins augment your experience with improvements in the app itself"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Butik",confirmText:"Visa butik i hem",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Browse Themes and Plugins in the Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod uses it\'s own Store, where you can easily look around and install"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Inställningar",confirmText:"Visa GooseMod inställningar",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Inställningar-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Experimentella funktioner",description:"Prova nya experimentella funktioner"},{name:"Verktyg",description:"Make backups, reset GooseMod, and more"},{name:"Tweaks",description:"Tweak GooseMod to how you want it"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Use GooseMod\'s Settings to customise it\'s features"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"There are various options for you to change"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Gemenskap",confirmText:"Join GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ställ frågor",description:"Ask any questions and get support"},{name:"Nyheter",description:"Get the latest news and announcements around GooseMod and related projects"},{name:"Bli involverad",description:"Help out with suggestions, supporting others, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Join GooseMod\'s Community"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Join our Discord for further information and more"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Läs mer",cancelText:"Inte Intresserad",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Butik",description:"Learn about GooseMod\'s Store and what\'s in it"},{name:"Inställningar",description:"Find out about the settings for GooseMod and plugins"},{name:"Gemenskap",description:"Join our Discord to ask questions, give feedback, keep up to date with news, and more"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Learn about GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Go through a short tour through GooseMod\'s core functions"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Insticksprogram"===e[1])),themes:e.settings.items.find((e=>"Teman"===e[1])),snippets:e.settings.items.find((e=>"Snuttar"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Teman"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Teman","themes"),id:"gm-home-themes",text:"Teman",selected:!1})),c(t.createElement(a,{style:{display:S||"Insticksprogram"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Insticksprogram","plugins"),id:"gm-home-plugins",text:"Insticksprogram",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snuttar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snuttar","snippets"),id:"gm-home-snippets",text:"Snuttar",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snuttar"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Ta bort":"Lägg till",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Lägg till",s.buttonText="Lägg till",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Ta bort",s.buttonText="Ta bort",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Inställningar":o="settings";break;case"Insticksprogram":o="plugins";break;case"Teman":o="themes";break;case"Snuttar":o="snippets";break;case"Ändringslogg":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Inställningar"),t?void 0:o("Insticksprogram"),t?void 0:o("Teman"),o("Ändringslogg")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod moduler",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod moduler"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Insticksprogram"===e[1]||"Teman"===e[1]||"Snuttar"===e[1])||!t.snippets&&"Snuttar"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Inställningar":o="settings";break;case"Insticksprogram":o="plugins";break;case"Teman":o="themes";break;case"Snuttar":o="snippets";break;case"Ändringslogg":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Insticksprogram"!==t[1]&&"Teman"!==t[1]&&"Snuttar"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Insticksprogram"!==e.target.textContent&&"Teman"!==e.target.textContent&&"Snuttar"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Ändringslogg",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod moduler"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("Inställningar",["",{type:"header",text:"Inställningar"},{type:"toggle",text:"GooseMod Change Log",subtext:"Show GooseMod \"Change Log\" setting",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Main Separators",subtext:"Show separators between main GooseMod settings",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Butik i hem",subtext:"Put GooseMod Store options in home instead of in settings",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Butik"},{type:"toggle",text:"Automatisk uppdatering",subtext:"Automatically update repos and modules every hour",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Utseende"},{type:"toggle",text:"GooseMod Badges",subtext:"Shows GooseMod\'s badges",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Verktyg"},{type:"text-and-button",text:"Rensa cacher",subtext:"Purges (completely removes) most caches GooseMod uses",buttonText:"Rensa",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Start Tour",subtext:"Go through GooseMod\'s startup tour again",buttonText:"Tour",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Kopiera Debuginfo",subtext:"Copies information on setup and GooseMod for reporting and debugging",buttonText:"Kopiera",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Återställ GooseMod",subtext:"Resets GooseMod completely: removes all preferences and modules; like a first-time install",buttonText:"Återställ",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Säkerhetskopiering"},{type:"text-and-button",text:"Skapa säkerhetskopia",subtext:"Creates a file for backup of your GooseMod modules and settings",buttonText:"Säkerhetskopia",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Återställ säkerhetskopia",subtext:"Restore your GooseMod modules and settings via a backup file, **only restore backups you trust**",buttonText:"Återställ",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tweaks",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Minor changes like small UI changes to make GooseMod be how you like"},{type:"toggle",text:"Placeholder Image",subtext:"Use a placeholder image in the Store for modules without images",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Collapsible Home Category",subtext:"Let home category be collapsible via icon",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Experimentell",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Experimental settings are likely incomplete and unstable, which may result in a reduced experience"},{type:"toggle",experimental:!0,text:"Dataattribut",subtext:"Add data attributes to some elements for some themes to use",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippets",subtext:"Enable Snippets tab in Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Tvinga temainställningar",subtext:"Force auto-generated settings for all themes",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Stjärnor",i="Alla",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Butik":"Installerad";switch(r){case"A-Z":t.style.order="";break;case"Senast uppdaterad":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Stjärnor":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Butik"!==n&&n!==p||"Alla"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Butik";"Butik"!==n&&"Installerad"!==n&&(n="Butik"),o.forEach(t);const a=""===d&&"Butik"===n&&"Alla"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Inga resultat hittades"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Inga resultat hittades",""!==d&&"Butik"===n&&"Alla"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Inga resultat hittades, menade du insticksprogram?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Inga resultat hittades, menade du teman?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Alla teman"!==c.textContent&&"Alla insticksprogram"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Insticksprogram","Teman"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Sök efter insticksprogram":"Sök efter teman",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sortera efter",options:["Stjärnor","A-Z","Senast uppdaterad"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Författare",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Alla"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Top Starred",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Nyligen uppdaterade",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Alla insticksprogram":"Alla teman"},{type:"gm-footer"}]))),e.settings.createItem("Snuttar",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Ändringslogg",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod moduler"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Insticksprogram"===e||"Teman"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Teman":"Insticksprogram",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod butik"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod butik"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod butik"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod butik"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Ta bort",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Installera",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Insticksprogram"===e[1]||"Teman"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Ta bort":"Installera",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsor","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Översättare","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Utvecklare","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Official Discord","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Ta bort"===this.props.buttonText?"Installera":"Ta bort",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Teman"===e[1]))[2],d=goosemod.settings.items.find((e=>"Insticksprogram"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod moduler")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Öppna länk"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Ta bort"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Verifierad",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Otillförlitlig",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Ingen PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Repos"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Ogiltigt filförråd",{type:"error",timeout:5e3,subtext:"Ogiltigt format"});if(!confirm("External repos pose security risks as they are not controlled by GooseMod developers. We are not responsible for any dangers because of external repos added by users.\n\nIf you do not trust the owner of this repo do not use it as it could compromise your Discord install.\n\nPlease confirm adding this repo by pressing OK."))return void goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("This repo is not known or trusted (no PGP verification), please be extra careful. Make sure you trust the owner(s) of this repo completely.\n\nTo solve this issue ask the repo maintainer to add PGP support.\n\nPlease reconfirm adding this repo by pressing OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"Refused Security Prompt"}):goosemod.showToast("Cancelled Adding Repo",{type:"danger",timeout:5e3,subtext:"PGP Otillförlitligt misslyckande"})}},"Lägg till")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Butik"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Installerad")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Uppdatera",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Repos",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.th.js b/goosemod.th.js index 07b51bc7..6ac2c732 100644 --- a/goosemod.th.js +++ b/goosemod.th.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ธีม",confirmText:"เรียกดูธีม",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"แต่ง Discord ของคุณด้วย Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"เลือกจากธีมมากกว่า 100 ธีมเพื่อปรับแต่งและปรับปรุงส่วนต่อประสานผู้ใช้ของคุณ"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ปลั๊กอิน",confirmText:"เรียกดูปลั๊กอิน",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"ปรับแต่ง Discord ของคุณ"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"ปลั๊กอินเสริมประสบการณ์ของคุณด้วยการปรับปรุงในแอปเอง"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ร้านค้า",confirmText:"ดูร้านค้าในโฮม",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"เรียกดูธีมและปลั๊กอินใน Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod ใช้ร้านค้าของตัวเองซึ่งคุณสามารถมองไปรอบ ๆ และติดตั้งได้อย่างง่ายดาย"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"การตั้งค่า",confirmText:"ดูการตั้งค่า GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-การตั้งค่า-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ส่วนทดลอง",description:"ลองส่วนทดลอง"},{name:"คุณประโยชน์",description:"สำรองข้อมูล รีเซ็ต GooseMod และอื่นๆ"},{name:"ปรับแต่ง",description:"ปรับแต่ง GooseMod ตามที่คุณต้องการ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"ใช้การตั้งค่าของ GooseMod เพื่อปรับแต่งคุณสมบัติของมัน"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"มีตัวเลือกมากมายให้คุณเปลี่ยน"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ชุมชน",confirmText:"เข้าร่วม GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ถามคำถาม",description:"ถามคำถามและรับการสนับสนุน"},{name:"ข่าว",description:"รับข่าวสารและประกาศล่าสุดเกี่ยวกับ GooseMod และโครงการที่เกี่ยวข้อง"},{name:"มีส่วนเกี่ยวข้อง",description:"ช่วยแนะนำ ช่วยเหลือผู้อื่น และอื่นๆ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"เข้าร่วมชุมชนของ GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"เข้าร่วม Discord ของเราสำหรับข้อมูลเพิ่มเติมและอื่น ๆ"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"เรียนรู้เพิ่มเติม",cancelText:"ไม่สนใจ",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ร้านค้า",description:"เรียนรู้เกี่ยวกับ GooseMod\'s Store และสิ่งที่อยู่ในนั้น"},{name:"การตั้งค่า",description:"ค้นหาข้อมูลเกี่ยวกับการตั้งค่าสำหรับ GooseMod และปลั๊กอิน"},{name:"ชุมชน",description:"เข้าร่วม Discord ของเราเพื่อถามคําถามให้ข้อเสนอแนะติดตามข่าวสารและอื่น ๆ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"เรียนรู้เกี่ยวกับ GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"ชมทัวร์สั้นๆ ผ่านฟังก์ชันหลักของ GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"ปลั๊กอิน"===e[1])),themes:e.settings.items.find((e=>"ธีม"===e[1])),snippets:e.settings.items.find((e=>"ตัวอย่าง"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"ธีม"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("ธีม","themes"),id:"gm-home-themes",text:"ธีม",selected:!1})),c(t.createElement(a,{style:{display:S||"ปลั๊กอิน"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("ปลั๊กอิน","plugins"),id:"gm-home-plugins",text:"ปลั๊กอิน",selected:!1})),k?c(t.createElement(a,{style:{display:S||"ตัวอย่าง"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("ตัวอย่าง","snippets"),id:"gm-home-snippets",text:"ตัวอย่าง",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"ตัวอย่าง"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"ลบ":"เพิ่ม",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="เพิ่ม",s.buttonText="เพิ่ม",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="ลบ",s.buttonText="ลบ",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"การตั้งค่า":o="settings";break;case"ปลั๊กอิน":o="plugins";break;case"ธีม":o="themes";break;case"ตัวอย่าง":o="snippets";break;case"บันทึกการเปลี่ยนแปลง":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("การตั้งค่า"),t?void 0:o("ปลั๊กอิน"),t?void 0:o("ธีม"),o("บันทึกการเปลี่ยนแปลง")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"โมดูล GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"โมดูล GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("ปลั๊กอิน"===e[1]||"ธีม"===e[1]||"ตัวอย่าง"===e[1])||!t.snippets&&"ตัวอย่าง"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"การตั้งค่า":o="settings";break;case"ปลั๊กอิน":o="plugins";break;case"ธีม":o="themes";break;case"ตัวอย่าง":o="snippets";break;case"บันทึกการเปลี่ยนแปลง":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"ปลั๊กอิน"!==t[1]&&"ธีม"!==t[1]&&"ตัวอย่าง"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"ปลั๊กอิน"!==e.target.textContent&&"ธีม"!==e.target.textContent&&"ตัวอย่าง"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","บันทึกการเปลี่ยนแปลง",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"โมดูล GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("การตั้งค่า",["",{type:"header",text:"การตั้งค่า"},{type:"toggle",text:"บันทึกการเปลี่ยนแปลงของ GooseMod",subtext:"แสดงบันทึกการเปลี่ยนแปลงของ GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"ตัวแยกหลัก",subtext:"แสดงตัวคั่นระหว่างการตั้งค่า GooseMod หลัก",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"เก็บในโฟลเดอร์หลัก",subtext:"ใส่ตัวเลือก GooseMod Store ในโฟลเดอร์หลักแทนการตั้งค่า",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"ร้านค้า"},{type:"toggle",text:"อัปเดตอัตโนมัติ",subtext:"อัปเดต repos และโมดูลโดยอัตโนมัติทุก ๆ ชั่วโมง",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"รูปแบบ"},{type:"toggle",text:"ตรา GooseMod",subtext:"แสดงตรา GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"คุณประโยชน์"},{type:"text-and-button",text:"ล้างแคช",subtext:"ล้าง (เอาออกอย่างสมบูรณ์) แคชส่วนใหญ่ที่ GooseMod ใช้",buttonText:"ลบ",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"เริ่มทัวร์",subtext:"ดูทัวร์เริ่มต้นของ GooseMod อีกครั้ง",buttonText:"ทัวร์",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"คัดลอกข้อมูลการดีบัก",subtext:"คัดลอกข้อมูลเกี่ยวกับการตั้งค่าและ GooseMod สําหรับการรายงานและการดีบัก",buttonText:"คัดลอก",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"รีเซ็ต GooseMod",subtext:"รีเซ็ต GooseMod อย่างสมบูรณ์: ลบการตั้งค่าและโมดูลทั้งหมด เหมือนการติดตั้งครั้งแรก",buttonText:"รีเซ็ต",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"สำรองข้อมูล"},{type:"text-and-button",text:"สำรองข้อมูล",subtext:"สร้างไฟล์สําหรับการสํารองข้อมูลโมดูลและการตั้งค่า GooseMod ของคุณ",buttonText:"สำรอง",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"เรียกข้อมูลที่ถูกสำรอง",subtext:"กู้คืนโมดูลและการตั้งค่า GooseMod ของคุณผ่านไฟล์สํารอง **กู้คืนข้อมูลสํารองที่คุณเชื่อถือเท่านั้น**",buttonText:"สำรอง",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"ปรับแต่ง",collapsed:!0,collapseOffset:1},{type:"subtext",text:"การเปลี่ยนแปลงเล็กน้อยเช่นการเปลี่ยนแปลง UI ขนาดเล็กเพื่อทําให้ GooseMod เป็นอย่างที่คุณต้องการ"},{type:"toggle",text:"รูปตัวยึดตําแหน่ง",subtext:"ใช้รูปพื้นที่ที่สํารองไว้ใน Store สําหรับโมดูลที่ไม่มีรูปภาพ",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"ประเภทหน้าแรกที่ยุบได้",subtext:"อนุญาตให้ยุบประเภทบ้านผ่านไอคอน",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"ส่วนทดลอง",collapsed:!0,collapseOffset:1},{type:"subtext",text:"การตั้งค่าการทดลองอาจไม่สมบูรณ์และไม่เสถียร ซึ่งอาจส่งผลให้ประสบการณ์ของคุณลดลง"},{type:"toggle",experimental:!0,text:"คุณสมบัติของข้อมูล",subtext:"เพิ่มแอตทริบิวต์ข้อมูลไปยังองค์ประกอบบางอย่างเพื่อให้บางธีมใช้",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"ตัวอย่าง",subtext:"เปิดใช้งานแท็บตัวอย่างใน Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"บังคับการตั้งค่าธีม",subtext:"บังคับการตั้งค่าที่สร้างขึ้นโดยอัตโนมัติสําหรับธีมทั้งหมด",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="ดาว",i="ทั้งหมด",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"ร้านค้า":"ติดตั้งแล้ว";switch(r){case"A - Z":t.style.order="";break;case"อัพเดทครั้งสุดท้าย":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"ดาว":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"ร้านค้า"!==n&&n!==p||"ทั้งหมด"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"ร้านค้า";"ร้านค้า"!==n&&"ติดตั้งแล้ว"!==n&&(n="ร้านค้า"),o.forEach(t);const a=""===d&&"ร้านค้า"===n&&"ทั้งหมด"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"ไม่พบผลลัพธ์"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="ไม่พบผลลัพธ์",""!==d&&"ร้านค้า"===n&&"ทั้งหมด"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="ไม่พบผลลัพธ์ คุณหมายถึงปลั๊กอินใช่หรือไม่?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="ไม่พบผลลัพธ์ คุณหมายถึงธีมใช่หรือไม่?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"ธีมทั้งหมด"!==c.textContent&&"ปลั๊กอินทั้งหมด"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["ปลั๊กอิน","ธีม"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"ค้นหาปลั๊กอิน":"ค้นหาธีม",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"เรียงโดย",options:["ดาว","A - Z","อัพเดทครั้งสุดท้าย"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"ผู้เขียน",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("ทั้งหมด"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"ดาวสูงสุด",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"อัพเดทล่าสุด",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"ปลั๊กอินทั้งหมด":"ธีมทั้งหมด"},{type:"gm-footer"}]))),e.settings.createItem("ตัวอย่าง",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("บันทึกการเปลี่ยนแปลง",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("โมดูล GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"ปลั๊กอิน"===e||"ธีม"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"ธีม":"ปลั๊กอิน",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"ร้านค้า GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"ร้านค้า GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"ร้านค้า GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"ร้านค้า GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="ลบ",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="ติดตั้ง",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"ปลั๊กอิน"===e[1]||"ธีม"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"ลบ":"ติดตั้ง",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("ผู้สนับสนุน Goosemod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("ผู้แปลภาษา GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("นักพัฒนา GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("ดิสคอร์ดหลักของ GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="ลบ"===this.props.buttonText?"ติดตั้ง":"ลบ",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"ธีม"===e[1]))[2],d=goosemod.settings.items.find((e=>"ปลั๊กอิน"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"โมดูล GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"ลบ"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="ตรวจสอบโดย PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ไม่น่าเฃื่อถือ",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="ไม่มี PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"ที่จัดเก็บ"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("ที่จัดเก็บไม่ถูกต้อง",{type:"error",timeout:5e3,subtext:"รูบแบบไม่ถูกต้อง"});if(!confirm("ที่เก็บภายนอกมีความเสี่ยงด้านความปลอดภัยเนื่องจากไม่ได้ควบคุมโดยนักพัฒนา GooseMod เราไม่รับผิดชอบต่ออันตรายใด ๆ เนื่องจาก ที่จัดเก็บภายนอกที่เพิ่มโดยผู้ใช้\n\nหากคุณไม่เชื่อถือเจ้าของ ที่เก็บนี้ อย่าใช้เพราะอาจทำให้การติดตั้ง Discord ของคุณเสียหาย\n \nโปรดยืนยันการเพิ่ม ที่เก็บนี้โดยกด ตกลง"))return void goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"ปฏิเสธการแจ้งความปลอดภัย"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("ที่จัดเก็บนี้ไม่เป็นที่รู้จักหรือเชื่อถือได้ (ไม่มีการตรวจสอบ PGP) โปรดใช้ความระมัดระวังเป็นพิเศษ ตรวจสอบให้แน่ใจว่าคุณไว้วางใจเจ้าของ ที่จัดเก็บนี้อย่างสมบูรณ์\n\nในการแก้ปัญหานี้ ให้ขอให้ผู้ดูแล ที่จัดเก็บเพิ่มการสนับสนุนแก่ PGP\n\nโปรดยืนยันการเพิ่ม ที่จัดเก็บนี้อีกครั้งโดยกด ตกลง")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"ปฏิเสธการแจ้งความปลอดภัย"}):goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"PGP ความล้มเหลวที่ไม่น่าเชื่อถือ"})}},"เพิ่ม")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"ร้านค้า"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"ติดตั้งแล้ว")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"โหลดใหม่",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"ที่จัดเก็บ",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ธีม",confirmText:"เรียกดูธีม",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"แต่ง Discord ของคุณด้วย Themes"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"เลือกจากธีมมากกว่า 100 ธีมเพื่อปรับแต่งและปรับปรุงส่วนต่อประสานผู้ใช้ของคุณ"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ปลั๊กอิน",confirmText:"เรียกดูปลั๊กอิน",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"ปรับแต่ง Discord ของคุณ"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"ปลั๊กอินเสริมประสบการณ์ของคุณด้วยการปรับปรุงในแอปเอง"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ร้านค้า",confirmText:"ดูร้านค้าในโฮม",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"เรียกดูธีมและปลั๊กอินใน Store"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod ใช้ร้านค้าของตัวเองซึ่งคุณสามารถมองไปรอบ ๆ และติดตั้งได้อย่างง่ายดาย"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"การตั้งค่า",confirmText:"ดูการตั้งค่า GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-การตั้งค่า-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ส่วนทดลอง",description:"ลองส่วนทดลอง"},{name:"คุณประโยชน์",description:"สำรองข้อมูล รีเซ็ต GooseMod และอื่นๆ"},{name:"ปรับแต่ง",description:"ปรับแต่ง GooseMod ตามที่คุณต้องการ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"ใช้การตั้งค่าของ GooseMod เพื่อปรับแต่งคุณสมบัติของมัน"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"มีตัวเลือกมากมายให้คุณเปลี่ยน"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"ชุมชน",confirmText:"เข้าร่วม GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ถามคำถาม",description:"ถามคำถามและรับการสนับสนุน"},{name:"ข่าว",description:"รับข่าวสารและประกาศล่าสุดเกี่ยวกับ GooseMod และโครงการที่เกี่ยวข้อง"},{name:"มีส่วนเกี่ยวข้อง",description:"ช่วยแนะนำ ช่วยเหลือผู้อื่น และอื่นๆ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"เข้าร่วมชุมชนของ GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"เข้าร่วม Discord ของเราสำหรับข้อมูลเพิ่มเติมและอื่น ๆ"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"เรียนรู้เพิ่มเติม",cancelText:"ไม่สนใจ",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"ร้านค้า",description:"เรียนรู้เกี่ยวกับ GooseMod\'s Store และสิ่งที่อยู่ในนั้น"},{name:"การตั้งค่า",description:"ค้นหาข้อมูลเกี่ยวกับการตั้งค่าสำหรับ GooseMod และปลั๊กอิน"},{name:"ชุมชน",description:"เข้าร่วม Discord ของเราเพื่อถามคําถามให้ข้อเสนอแนะติดตามข่าวสารและอื่น ๆ"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"เรียนรู้เกี่ยวกับ GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"ชมทัวร์สั้นๆ ผ่านฟังก์ชันหลักของ GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"ปลั๊กอิน"===e[1])),themes:e.settings.items.find((e=>"ธีม"===e[1])),snippets:e.settings.items.find((e=>"ตัวอย่าง"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"ธีม"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("ธีม","themes"),id:"gm-home-themes",text:"ธีม",selected:!1})),c(t.createElement(a,{style:{display:S||"ปลั๊กอิน"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("ปลั๊กอิน","plugins"),id:"gm-home-plugins",text:"ปลั๊กอิน",selected:!1})),k?c(t.createElement(a,{style:{display:S||"ตัวอย่าง"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("ตัวอย่าง","snippets"),id:"gm-home-snippets",text:"ตัวอย่าง",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"ตัวอย่าง"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"ลบ":"เพิ่ม",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="เพิ่ม",s.buttonText="เพิ่ม",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="ลบ",s.buttonText="ลบ",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"การตั้งค่า":o="settings";break;case"ปลั๊กอิน":o="plugins";break;case"ธีม":o="themes";break;case"ตัวอย่าง":o="snippets";break;case"บันทึกการเปลี่ยนแปลง":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("การตั้งค่า"),t?void 0:o("ปลั๊กอิน"),t?void 0:o("ธีม"),o("บันทึกการเปลี่ยนแปลง")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"โมดูล GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"โมดูล GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("ปลั๊กอิน"===e[1]||"ธีม"===e[1]||"ตัวอย่าง"===e[1])||!t.snippets&&"ตัวอย่าง"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"การตั้งค่า":o="settings";break;case"ปลั๊กอิน":o="plugins";break;case"ธีม":o="themes";break;case"ตัวอย่าง":o="snippets";break;case"บันทึกการเปลี่ยนแปลง":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"ปลั๊กอิน"!==t[1]&&"ธีม"!==t[1]&&"ตัวอย่าง"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"ปลั๊กอิน"!==e.target.textContent&&"ธีม"!==e.target.textContent&&"ตัวอย่าง"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","บันทึกการเปลี่ยนแปลง",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"โมดูล GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Refresh","Refresh Required","This setting **requires a refresh to take effect**. You **may experience some strange behaviour** in this session before refreshing.")&&location.reload()};e.settings.createItem("การตั้งค่า",["",{type:"header",text:"การตั้งค่า"},{type:"toggle",text:"บันทึกการเปลี่ยนแปลงของ GooseMod",subtext:"แสดงบันทึกการเปลี่ยนแปลงของ GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"ตัวแยกหลัก",subtext:"แสดงตัวคั่นระหว่างการตั้งค่า GooseMod หลัก",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"เก็บในโฟลเดอร์หลัก",subtext:"ใส่ตัวเลือก GooseMod Store ในโฟลเดอร์หลักแทนการตั้งค่า",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"ร้านค้า"},{type:"toggle",text:"อัปเดตอัตโนมัติ",subtext:"อัปเดต repos และโมดูลโดยอัตโนมัติทุก ๆ ชั่วโมง",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"New Module Notifications",subtext:"Shows a toast each time a new module is added to the Store",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"รูปแบบ"},{type:"toggle",text:"ตรา GooseMod",subtext:"แสดงตรา GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"คุณประโยชน์"},{type:"text-and-button",text:"ล้างแคช",subtext:"ล้าง (เอาออกอย่างสมบูรณ์) แคชส่วนใหญ่ที่ GooseMod ใช้",buttonText:"ลบ",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"เริ่มทัวร์",subtext:"ดูทัวร์เริ่มต้นของ GooseMod อีกครั้ง",buttonText:"ทัวร์",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"คัดลอกข้อมูลการดีบัก",subtext:"คัดลอกข้อมูลเกี่ยวกับการตั้งค่าและ GooseMod สําหรับการรายงานและการดีบัก",buttonText:"คัดลอก",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"รีเซ็ต GooseMod",subtext:"รีเซ็ต GooseMod อย่างสมบูรณ์: ลบการตั้งค่าและโมดูลทั้งหมด เหมือนการติดตั้งครั้งแรก",buttonText:"รีเซ็ต",onclick:async()=>{await e.confirmDialog("Reset","Reset GooseMod","Confirming will completely reset GooseMod, removing all preferences and modules; as if you had installed GooseMod for the first time. This is irreversible.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"สำรองข้อมูล"},{type:"text-and-button",text:"สำรองข้อมูล",subtext:"สร้างไฟล์สําหรับการสํารองข้อมูลโมดูลและการตั้งค่า GooseMod ของคุณ",buttonText:"สำรอง",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"เรียกข้อมูลที่ถูกสำรอง",subtext:"กู้คืนโมดูลและการตั้งค่า GooseMod ของคุณผ่านไฟล์สํารอง **กู้คืนข้อมูลสํารองที่คุณเชื่อถือเท่านั้น**",buttonText:"สำรอง",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"ปรับแต่ง",collapsed:!0,collapseOffset:1},{type:"subtext",text:"การเปลี่ยนแปลงเล็กน้อยเช่นการเปลี่ยนแปลง UI ขนาดเล็กเพื่อทําให้ GooseMod เป็นอย่างที่คุณต้องการ"},{type:"toggle",text:"รูปตัวยึดตําแหน่ง",subtext:"ใช้รูปพื้นที่ที่สํารองไว้ใน Store สําหรับโมดูลที่ไม่มีรูปภาพ",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"ประเภทหน้าแรกที่ยุบได้",subtext:"อนุญาตให้ยุบประเภทบ้านผ่านไอคอน",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"ส่วนทดลอง",collapsed:!0,collapseOffset:1},{type:"subtext",text:"การตั้งค่าการทดลองอาจไม่สมบูรณ์และไม่เสถียร ซึ่งอาจส่งผลให้ประสบการณ์ของคุณลดลง"},{type:"toggle",experimental:!0,text:"คุณสมบัติของข้อมูล",subtext:"เพิ่มแอตทริบิวต์ข้อมูลไปยังองค์ประกอบบางอย่างเพื่อให้บางธีมใช้",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"ตัวอย่าง",subtext:"เปิดใช้งานแท็บตัวอย่างใน Store",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"บังคับการตั้งค่าธีม",subtext:"บังคับการตั้งค่าที่สร้างขึ้นโดยอัตโนมัติสําหรับธีมทั้งหมด",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="ดาว",i="ทั้งหมด",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"ร้านค้า":"ติดตั้งแล้ว";switch(r){case"A - Z":t.style.order="";break;case"อัพเดทครั้งสุดท้าย":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"ดาว":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"ร้านค้า"!==n&&n!==p||"ทั้งหมด"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"ร้านค้า";"ร้านค้า"!==n&&"ติดตั้งแล้ว"!==n&&(n="ร้านค้า"),o.forEach(t);const a=""===d&&"ร้านค้า"===n&&"ทั้งหมด"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"ไม่พบผลลัพธ์"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="ไม่พบผลลัพธ์",""!==d&&"ร้านค้า"===n&&"ทั้งหมด"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="ไม่พบผลลัพธ์ คุณหมายถึงปลั๊กอินใช่หรือไม่?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="ไม่พบผลลัพธ์ คุณหมายถึงธีมใช่หรือไม่?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"ธีมทั้งหมด"!==c.textContent&&"ปลั๊กอินทั้งหมด"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["ปลั๊กอิน","ธีม"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"ค้นหาปลั๊กอิน":"ค้นหาธีม",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"เรียงโดย",options:["ดาว","A - Z","อัพเดทครั้งสุดท้าย"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"ผู้เขียน",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("ทั้งหมด"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"ดาวสูงสุด",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"อัพเดทล่าสุด",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"ปลั๊กอินทั้งหมด":"ธีมทั้งหมด"},{type:"gm-footer"}]))),e.settings.createItem("ตัวอย่าง",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("บันทึกการเปลี่ยนแปลง",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("โมดูล GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"ปลั๊กอิน"===e||"ธีม"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"ธีม":"ปลั๊กอิน",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"ร้านค้า GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"ร้านค้า GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"ร้านค้า GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"ร้านค้า GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="ลบ",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="ติดตั้ง",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"ปลั๊กอิน"===e[1]||"ธีม"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"ลบ":"ติดตั้ง",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("ผู้สนับสนุน Goosemod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("ผู้แปลภาษา GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("นักพัฒนา GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("ดิสคอร์ดหลักของ GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="ลบ"===this.props.buttonText?"ติดตั้ง":"ลบ",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"ธีม"===e[1]))[2],d=goosemod.settings.items.find((e=>"ปลั๊กอิน"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"โมดูล GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Open Link"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"ลบ"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="ตรวจสอบโดย PGP",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP ไม่น่าเฃื่อถือ",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="ไม่มี PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"ที่จัดเก็บ"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("ที่จัดเก็บไม่ถูกต้อง",{type:"error",timeout:5e3,subtext:"รูบแบบไม่ถูกต้อง"});if(!confirm("ที่เก็บภายนอกมีความเสี่ยงด้านความปลอดภัยเนื่องจากไม่ได้ควบคุมโดยนักพัฒนา GooseMod เราไม่รับผิดชอบต่ออันตรายใด ๆ เนื่องจาก ที่จัดเก็บภายนอกที่เพิ่มโดยผู้ใช้\n\nหากคุณไม่เชื่อถือเจ้าของ ที่เก็บนี้ อย่าใช้เพราะอาจทำให้การติดตั้ง Discord ของคุณเสียหาย\n \nโปรดยืนยันการเพิ่ม ที่เก็บนี้โดยกด ตกลง"))return void goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"ปฏิเสธการแจ้งความปลอดภัย"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("ที่จัดเก็บนี้ไม่เป็นที่รู้จักหรือเชื่อถือได้ (ไม่มีการตรวจสอบ PGP) โปรดใช้ความระมัดระวังเป็นพิเศษ ตรวจสอบให้แน่ใจว่าคุณไว้วางใจเจ้าของ ที่จัดเก็บนี้อย่างสมบูรณ์\n\nในการแก้ปัญหานี้ ให้ขอให้ผู้ดูแล ที่จัดเก็บเพิ่มการสนับสนุนแก่ PGP\n\nโปรดยืนยันการเพิ่ม ที่จัดเก็บนี้อีกครั้งโดยกด ตกลง")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"ปฏิเสธการแจ้งความปลอดภัย"}):goosemod.showToast("การนำเข้าที่จัดเก็บถูกยกเลิก",{type:"danger",timeout:5e3,subtext:"PGP ความล้มเหลวที่ไม่น่าเชื่อถือ"})}},"เพิ่ม")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"ร้านค้า"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"ติดตั้งแล้ว")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"โหลดใหม่",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"ที่จัดเก็บ",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.tr.js b/goosemod.tr.js index 4d6aed1d..16310a55 100644 --- a/goosemod.tr.js +++ b/goosemod.tr.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temalar",confirmText:"Temalara Gözatın",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discord\'unuzu Temalarla Güzelleştirin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Kullanıcı arayüzünüzü geliştirmek için 100\'den fazla tema arasından seçim yapın"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Eklentiler",confirmText:"Eklentilere Göz Atın",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Kaputun altında Discord\'unuzu güçlendirin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Eklentiler, uygulamanın kendisindeki iyileştirmelerle deneyiminizi artırır"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Mağaza",confirmText:"Başlangıçtaki Mağazayı Görüntüle",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Mağazadaki Temalara ve Eklentilere Gözatın"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod, etrafa kolayca bakabileceğiniz ve kurabileceğiniz kendi Mağazasını kullanır"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ayarlar",confirmText:"GooseMod Ayarlarını Görüntüle",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ayarlar-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Deneysel Özellikler",description:"Yeni deneysel özellikleri deneyin"},{name:"Araçlar",description:"Yedekleme yapın, GooseMod\'u sıfırlayın ve daha fazlasını yapın"},{name:"İnce Ayarlar",description:"GooseMod\'u istediğiniz gibi ayarlayın"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Özelliklerini özelleştirmek için GooseMod\'un Ayarlarını kullanın"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Değiştirmeniz için çeşitli seçenekler var"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Topluluk",confirmText:"GooseMod\'un Discord Sunucusuna Katılın",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Soru Sor",description:"Herhangi bir soru sorun ve destek alın"},{name:"Haberler",description:"GooseMod ve ilgili projeler hakkında en son haberleri ve duyuruları alın"},{name:"Dahil Olun",description:"Öneriler, destek ve daha fazlası hakkında yardım"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod\'un Topluluğuna Katılın"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Daha fazla bilgi ve daha fazlası için Discord\'umuza katılın"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Daha fazla bilgi edinin",cancelText:"İlgilenmiyorum",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Mağaza",description:"GooseMod\'s Store ve içinde ne olduğu hakkında bilgi edinin"},{name:"Ayarlar",description:"GooseMod ve eklentilerin ayarları hakkında daha fazla şey öğrenin"},{name:"Topluluk",description:"Soru sormak, geri bildirimde etmek, haberleri takip etmek ve daha fazlası için Discord\'umuza katılın"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod hakkında bilgi edinin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseMod\'un temel işlevlerini kısa bir turdan geçirin"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Eklentiler"===e[1])),themes:e.settings.items.find((e=>"Temalar"===e[1])),snippets:e.settings.items.find((e=>"Snippet\'lar"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temalar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temalar","themes"),id:"gm-home-themes",text:"Temalar",selected:!1})),c(t.createElement(a,{style:{display:S||"Eklentiler"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Eklentiler","plugins"),id:"gm-home-plugins",text:"Eklentiler",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippet\'lar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippet\'lar","snippets"),id:"gm-home-snippets",text:"Snippet\'lar",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippet\'lar"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Kaldır":"Ekle",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Ekle",s.buttonText="Ekle",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Kaldır",s.buttonText="Kaldır",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ayarlar":o="settings";break;case"Eklentiler":o="plugins";break;case"Temalar":o="themes";break;case"Snippet\'lar":o="snippets";break;case"Değişim Kaydı":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ayarlar"),t?void 0:o("Eklentiler"),t?void 0:o("Temalar"),o("Değişim Kaydı")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modülleri",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modülleri"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Eklentiler"===e[1]||"Temalar"===e[1]||"Snippet\'lar"===e[1])||!t.snippets&&"Snippet\'lar"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ayarlar":o="settings";break;case"Eklentiler":o="plugins";break;case"Temalar":o="themes";break;case"Snippet\'lar":o="snippets";break;case"Değişim Kaydı":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Eklentiler"!==t[1]&&"Temalar"!==t[1]&&"Snippet\'lar"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Eklentiler"!==e.target.textContent&&"Temalar"!==e.target.textContent&&"Snippet\'lar"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Değişim Kaydı",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modülleri"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Yeniden Başlat","Tekrar Başlatma Gerekli","Bu ayarın **etkin olması için yeniden başlatma yapılması gerekir**. Yeniden başlatmadan önce bu oturumda **bazı garip davranışlar** yaşayabilirsiniz.")&&location.reload()};e.settings.createItem("Ayarlar",["",{type:"header",text:"Ayarlar"},{type:"toggle",text:"GooseMod Değişim Günlüğü",subtext:"GooseMod \"Değişim Kaydı\" ayarını göster",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Ana Ayırıcılar",subtext:"Ana GooseMod ayarları arasında ayırıcıları göster",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Mağazayı ana menüye yerleştirme",subtext:"GooseMod mağaza seçeneklerini ayarlar yerine başlangıç ekranına koyun",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Mağaza"},{type:"toggle",text:"Otomatik Güncelleştirme",subtext:"Depoları ve modülleri her saat otomatik olarak güncelleyin",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Yeni Modül Bildirimleri",subtext:"Mağazaya her yeni modül eklendiğinde bir bildirim gösterir",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Görünüm"},{type:"toggle",text:"GooseMod Rozetleri",subtext:"GooseMod rozetlerini gösterir",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Araçlar"},{type:"text-and-button",text:"Önbellekleri Temizleme",subtext:"GooseMod\'un kullandığı çoğu önbelleği temizler (tamamen kaldırır)",buttonText:"Temizleme",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Turu Başlat",subtext:"GooseMod\'un başlangıç turunu tekrar gözden geçirin",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Hata Ayıklama Bilgilerini Kopyala",subtext:"Kurulum ve GooseMod hakkındaki bilgileri raporlama ve hata ayıklama için kopyalar",buttonText:"Kopyala",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod\'u Sıfırla",subtext:"GooseMod\'u tamamen sıfırlar: tüm tercihleri ve modülleri kaldırır; ilk kez yükleme gibi",buttonText:"Sıfırla",onclick:async()=>{await e.confirmDialog("Sıfırla","GooseMod\'u Sıfırla","Onaylamak, GooseMod\'u tamamen sıfırlayacak, tüm tercihleri ve modülleri kaldıracaktır; sanki GooseMod\'u ilk kez kurmuşsunuz gibi. Bu geri döndürülemez.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Yedek"},{type:"text-and-button",text:"Yedek Oluştur",subtext:"GooseMod modüllerinizin ve ayarlarınızın yedeği için bir dosya oluşturur",buttonText:"Yedek",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Yedeklemeyi Geri Yükle",subtext:"GooseMod modüllerinizi ve ayarlarınızı bir yedekleme dosyası aracılığıyla geri yükleyin, **yalnızca güvendiğiniz yedeklemeleri geri yükleyin**",buttonText:"Geri Yükle",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Düzenlemeler",collapsed:!0,collapseOffset:1},{type:"subtext",text:"GooseMod\'u istediğiniz gibi yapmak için kullanıcı arabirimi değişiklikleri gibi küçük değişiklikler"},{type:"toggle",text:"Yer Tutucu Görüntüsü",subtext:"Resim içermeyen modüller için Mağaza\'da yer tutucu görüntü kullanma",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Daraltılabilir Giriş Kategorisi",subtext:"Başlangıç kategorisinin bir simge kullanarak katlamasına izin verme",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Deneysel",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Deneysel ayarlar büyük olasılıkla eksik ve kararsızdır, bu da deneyimin azalmasına neden olabilir"},{type:"toggle",experimental:!0,text:"Veri Öznitelikleri",subtext:"Bazı temaların kullanması için bazı öğelere veri öznitelikleri ekleme",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippet\'lar",subtext:"Mağaza\'da Snippet\'lar sekmesini etkinleştir",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Tema Ayarlarını Zorla",subtext:"Tüm temalar için otomatik oluşturulan ayarları zorla",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Yıldızlar",i="Hepsi",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Mağaza":"Yüklendi";switch(r){case"A-Z":t.style.order="";break;case"Son Güncellenen":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Yıldızlar":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Mağaza"!==n&&n!==p||"Hepsi"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Mağaza";"Mağaza"!==n&&"Yüklendi"!==n&&(n="Mağaza"),o.forEach(t);const a=""===d&&"Mağaza"===n&&"Hepsi"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Sonuç bulunamadı"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Sonuç bulunamadı",""!==d&&"Mağaza"===n&&"Hepsi"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sonuç bulunamadı, eklentileri mi kastettiniz?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sonuç bulunamadı, temaları mı kastettiniz?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tüm Temalar"!==c.textContent&&"Tüm Eklentiler"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Eklentiler","Temalar"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Eklenti Ara":"Tema Ara",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sıralama ölçütü",options:["Yıldızlar","A-Z","Son Güncellenen"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Oluşturucu",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Hepsi"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"En Fazla Yıldızlanan",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"En Son Güncellenen",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tüm Eklentiler":"Tüm Temalar"},{type:"gm-footer"}]))),e.settings.createItem("Snippet\'lar",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Değişim Kaydı",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modülleri"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Eklentiler"===e||"Temalar"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temalar":"Eklentiler",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Mağazası"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Mağazası"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Mağazası"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Mağazası"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Kaldır",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Yükle",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Eklentiler"===e[1]||"Temalar"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Kaldır":"Yükle",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsoru","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Çevirmen","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Geliştirici","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Resmi Discord\'u","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Kaldır"===this.props.buttonText?"Yükle":"Kaldır",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temalar"===e[1]))[2],d=goosemod.settings.items.find((e=>"Eklentiler"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modülleri")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Linki aç"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Kaldır"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Doğrulandı",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Güvenilmeyen PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Yok",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Depolar"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Geçersiz Depo",{type:"error",timeout:5e3,subtext:"Geçersiz Biçim"});if(!confirm("Harici depolar, GooseMod geliştiricileri tarafından denetlenmediğinden güvenlik riskleri oluşturur. Kullanıcılar tarafından eklenen harici depolar nedeniyle karşılaşılacak herhangi bir tehlikeden sorumlu değiliz.\n\nBu deponun sahibine güvenmiyorsanız, Discord kurulumunuzu tehlikeye atabileceğinden onu kullanmayın.\n\nLütfen Tamam düğmesine basarak bu depoyu eklemeyi onaylayın."))return void goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"Reddedilen Güvenlik İstemi"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Bu depo bilinmiyor veya güvenilir değil (PGP doğrulaması yok), lütfen çok dikkatli olun. Bu deponun sahiplerine tamamen güvendiğinizden emin olun.\n\nBu sorunu çözmek için depo sahibinden PGP desteği eklemesini isteyin.\n\nLütfen Tamam düğmesine basarak bu depoyu eklemeyi yeniden onaylayın.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"Reddedilen Güvenlik İstemi"}):goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"PGP Güvenilmeyen Hata"})}},"Ekle")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Mağaza"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Yüklendi")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Yenile",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Depolar",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Temalar",confirmText:"Temalara Gözatın",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Discord\'unuzu Temalarla Güzelleştirin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Kullanıcı arayüzünüzü geliştirmek için 100\'den fazla tema arasından seçim yapın"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Eklentiler",confirmText:"Eklentilere Göz Atın",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Kaputun altında Discord\'unuzu güçlendirin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Eklentiler, uygulamanın kendisindeki iyileştirmelerle deneyiminizi artırır"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Mağaza",confirmText:"Başlangıçtaki Mağazayı Görüntüle",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Mağazadaki Temalara ve Eklentilere Gözatın"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod, etrafa kolayca bakabileceğiniz ve kurabileceğiniz kendi Mağazasını kullanır"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Ayarlar",confirmText:"GooseMod Ayarlarını Görüntüle",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Ayarlar-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Deneysel Özellikler",description:"Yeni deneysel özellikleri deneyin"},{name:"Araçlar",description:"Yedekleme yapın, GooseMod\'u sıfırlayın ve daha fazlasını yapın"},{name:"İnce Ayarlar",description:"GooseMod\'u istediğiniz gibi ayarlayın"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Özelliklerini özelleştirmek için GooseMod\'un Ayarlarını kullanın"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Değiştirmeniz için çeşitli seçenekler var"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Topluluk",confirmText:"GooseMod\'un Discord Sunucusuna Katılın",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Soru Sor",description:"Herhangi bir soru sorun ve destek alın"},{name:"Haberler",description:"GooseMod ve ilgili projeler hakkında en son haberleri ve duyuruları alın"},{name:"Dahil Olun",description:"Öneriler, destek ve daha fazlası hakkında yardım"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod\'un Topluluğuna Katılın"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Daha fazla bilgi ve daha fazlası için Discord\'umuza katılın"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Daha fazla bilgi edinin",cancelText:"İlgilenmiyorum",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Mağaza",description:"GooseMod\'s Store ve içinde ne olduğu hakkında bilgi edinin"},{name:"Ayarlar",description:"GooseMod ve eklentilerin ayarları hakkında daha fazla şey öğrenin"},{name:"Topluluk",description:"Soru sormak, geri bildirimde etmek, haberleri takip etmek ve daha fazlası için Discord\'umuza katılın"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"GooseMod hakkında bilgi edinin"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"GooseMod\'un temel işlevlerini kısa bir turdan geçirin"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Eklentiler"===e[1])),themes:e.settings.items.find((e=>"Temalar"===e[1])),snippets:e.settings.items.find((e=>"Snippet\'lar"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Temalar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Temalar","themes"),id:"gm-home-themes",text:"Temalar",selected:!1})),c(t.createElement(a,{style:{display:S||"Eklentiler"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Eklentiler","plugins"),id:"gm-home-plugins",text:"Eklentiler",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Snippet\'lar"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Snippet\'lar","snippets"),id:"gm-home-snippets",text:"Snippet\'lar",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Snippet\'lar"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Kaldır":"Ekle",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Ekle",s.buttonText="Ekle",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Kaldır",s.buttonText="Kaldır",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Ayarlar":o="settings";break;case"Eklentiler":o="plugins";break;case"Temalar":o="themes";break;case"Snippet\'lar":o="snippets";break;case"Değişim Kaydı":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Ayarlar"),t?void 0:o("Eklentiler"),t?void 0:o("Temalar"),o("Değişim Kaydı")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod Modülleri",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod Modülleri"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Eklentiler"===e[1]||"Temalar"===e[1]||"Snippet\'lar"===e[1])||!t.snippets&&"Snippet\'lar"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Ayarlar":o="settings";break;case"Eklentiler":o="plugins";break;case"Temalar":o="themes";break;case"Snippet\'lar":o="snippets";break;case"Değişim Kaydı":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Eklentiler"!==t[1]&&"Temalar"!==t[1]&&"Snippet\'lar"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Eklentiler"!==e.target.textContent&&"Temalar"!==e.target.textContent&&"Snippet\'lar"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Değişim Kaydı",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod Modülleri"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Yeniden Başlat","Tekrar Başlatma Gerekli","Bu ayarın **etkin olması için yeniden başlatma yapılması gerekir**. Yeniden başlatmadan önce bu oturumda **bazı garip davranışlar** yaşayabilirsiniz.")&&location.reload()};e.settings.createItem("Ayarlar",["",{type:"header",text:"Ayarlar"},{type:"toggle",text:"GooseMod Değişim Günlüğü",subtext:"GooseMod \"Değişim Kaydı\" ayarını göster",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Ana Ayırıcılar",subtext:"Ana GooseMod ayarları arasında ayırıcıları göster",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Mağazayı ana menüye yerleştirme",subtext:"GooseMod mağaza seçeneklerini ayarlar yerine başlangıç ekranına koyun",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Mağaza"},{type:"toggle",text:"Otomatik Güncelleştirme",subtext:"Depoları ve modülleri her saat otomatik olarak güncelleyin",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Yeni Modül Bildirimleri",subtext:"Mağazaya her yeni modül eklendiğinde bir bildirim gösterir",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Görünüm"},{type:"toggle",text:"GooseMod Rozetleri",subtext:"GooseMod rozetlerini gösterir",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Araçlar"},{type:"text-and-button",text:"Önbellekleri Temizleme",subtext:"GooseMod\'un kullandığı çoğu önbelleği temizler (tamamen kaldırır)",buttonText:"Temizleme",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Turu Başlat",subtext:"GooseMod\'un başlangıç turunu tekrar gözden geçirin",buttonText:"Tur",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Hata Ayıklama Bilgilerini Kopyala",subtext:"Kurulum ve GooseMod hakkındaki bilgileri raporlama ve hata ayıklama için kopyalar",buttonText:"Kopyala",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"GooseMod\'u Sıfırla",subtext:"GooseMod\'u tamamen sıfırlar: tüm tercihleri ve modülleri kaldırır; ilk kez yükleme gibi",buttonText:"Sıfırla",onclick:async()=>{await e.confirmDialog("Sıfırla","GooseMod\'u Sıfırla","Onaylamak, GooseMod\'u tamamen sıfırlayacak, tüm tercihleri ve modülleri kaldıracaktır; sanki GooseMod\'u ilk kez kurmuşsunuz gibi. Bu geri döndürülemez.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Yedek"},{type:"text-and-button",text:"Yedek Oluştur",subtext:"GooseMod modüllerinizin ve ayarlarınızın yedeği için bir dosya oluşturur",buttonText:"Yedek",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Yedeklemeyi Geri Yükle",subtext:"GooseMod modüllerinizi ve ayarlarınızı bir yedekleme dosyası aracılığıyla geri yükleyin, **yalnızca güvendiğiniz yedeklemeleri geri yükleyin**",buttonText:"Geri Yükle",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Düzenlemeler",collapsed:!0,collapseOffset:1},{type:"subtext",text:"GooseMod\'u istediğiniz gibi yapmak için kullanıcı arabirimi değişiklikleri gibi küçük değişiklikler"},{type:"toggle",text:"Yer Tutucu Görüntüsü",subtext:"Resim içermeyen modüller için Mağaza\'da yer tutucu görüntü kullanma",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Daraltılabilir Giriş Kategorisi",subtext:"Başlangıç kategorisinin bir simge kullanarak katlamasına izin verme",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Deneysel",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Deneysel ayarlar büyük olasılıkla eksik ve kararsızdır, bu da deneyimin azalmasına neden olabilir"},{type:"toggle",experimental:!0,text:"Veri Öznitelikleri",subtext:"Bazı temaların kullanması için bazı öğelere veri öznitelikleri ekleme",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Snippet\'lar",subtext:"Mağaza\'da Snippet\'lar sekmesini etkinleştir",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Tema Ayarlarını Zorla",subtext:"Tüm temalar için otomatik oluşturulan ayarları zorla",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Yıldızlar",i="Hepsi",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Mağaza":"Yüklendi";switch(r){case"A-Z":t.style.order="";break;case"Son Güncellenen":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Yıldızlar":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Mağaza"!==n&&n!==p||"Hepsi"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Mağaza";"Mağaza"!==n&&"Yüklendi"!==n&&(n="Mağaza"),o.forEach(t);const a=""===d&&"Mağaza"===n&&"Hepsi"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Sonuç bulunamadı"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Sonuç bulunamadı",""!==d&&"Mağaza"===n&&"Hepsi"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sonuç bulunamadı, eklentileri mi kastettiniz?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Sonuç bulunamadı, temaları mı kastettiniz?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tüm Temalar"!==c.textContent&&"Tüm Eklentiler"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Eklentiler","Temalar"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Eklenti Ara":"Tema Ara",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sıralama ölçütü",options:["Yıldızlar","A-Z","Son Güncellenen"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Oluşturucu",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Hepsi"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"En Fazla Yıldızlanan",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"En Son Güncellenen",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tüm Eklentiler":"Tüm Temalar"},{type:"gm-footer"}]))),e.settings.createItem("Snippet\'lar",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Değişim Kaydı",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod Modülleri"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Eklentiler"===e||"Temalar"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Temalar":"Eklentiler",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod Mağazası"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod Mağazası"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod Mağazası"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod Mağazası"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Kaldır",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Yükle",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Eklentiler"===e[1]||"Temalar"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Kaldır":"Yükle",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod Sponsoru","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Çevirmen","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod Geliştirici","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod Resmi Discord\'u","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Kaldır"===this.props.buttonText?"Yükle":"Kaldır",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Temalar"===e[1]))[2],d=goosemod.settings.items.find((e=>"Eklentiler"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod Modülleri")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Linki aç"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Kaldır"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Doğrulandı",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="Güvenilmeyen PGP",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Yok",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Depolar"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Geçersiz Depo",{type:"error",timeout:5e3,subtext:"Geçersiz Biçim"});if(!confirm("Harici depolar, GooseMod geliştiricileri tarafından denetlenmediğinden güvenlik riskleri oluşturur. Kullanıcılar tarafından eklenen harici depolar nedeniyle karşılaşılacak herhangi bir tehlikeden sorumlu değiliz.\n\nBu deponun sahibine güvenmiyorsanız, Discord kurulumunuzu tehlikeye atabileceğinden onu kullanmayın.\n\nLütfen Tamam düğmesine basarak bu depoyu eklemeyi onaylayın."))return void goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"Reddedilen Güvenlik İstemi"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Bu depo bilinmiyor veya güvenilir değil (PGP doğrulaması yok), lütfen çok dikkatli olun. Bu deponun sahiplerine tamamen güvendiğinizden emin olun.\n\nBu sorunu çözmek için depo sahibinden PGP desteği eklemesini isteyin.\n\nLütfen Tamam düğmesine basarak bu depoyu eklemeyi yeniden onaylayın.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"Reddedilen Güvenlik İstemi"}):goosemod.showToast("Depo Ekleme İptal Edildi",{type:"danger",timeout:5e3,subtext:"PGP Güvenilmeyen Hata"})}},"Ekle")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Mağaza"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Yüklendi")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Yenile",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Depolar",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.uk.js b/goosemod.uk.js index df52a611..e7378b26 100644 --- a/goosemod.uk.js +++ b/goosemod.uk.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Теми",confirmText:"Поглянути на теми",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прикрасіть Ваш Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Обирайте з більш ніж 100 тем, щоб відрегулювати та покращити Ваш користувацький інтерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плагіни",confirmText:"Поглянути на плагіни",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прокачайте свій Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Плагіни покращують Ваш досвід використання додатку за рахунок усіляких зручностей"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Крамниця",confirmText:"Заглянути у крамницю на головному екрані",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Шукайте теми та плагіни у крамниці"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod використовує свій власний магазин, у якому Ви легко зможете знайти та встановити модулі"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Налаштування",confirmText:"Заглянути у налаштування GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Налаштування-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Експериментальне",description:"Спробуйте свіжий експериментальний функціонал"},{name:"Утиліти",description:"Робіть резервні копії, скидайте налаштування GooseMod, і так далі"},{name:"Опції",description:"Відрегулюйте GooseMod як душі завгодно"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Налаштуйте GooseMod, щоб підігнати функціонал під себе"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ви можете змінювати багато різних налаштувань"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Спілка",confirmText:"Долучитися до Discord-серверу GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ставте запитання",description:"Ставте будь-які запитання та отримуйте допомогу"},{name:"Новини",description:"Залишайтеся в курсі новин та анонсів, що стосуються GooseMod та пов\'язаних проєктів"},{name:"Беріть участь",description:"Пропонуйте, допомагайте іншим, і так далі"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Долучитися до спілки GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Долучайтеся до нашого Discord-серверу для додаткової інформації"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Дізнатися більше",cancelText:"Не цікавить",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Крамниця",description:"Дізнатися більше про крамницю GooseMod та про те, що там є"},{name:"Налаштування",description:"Дізнатися більше про налаштування для GooseMod та плагінів"},{name:"Спілка",description:"Долучайтеся до нашого Discord-серверу, щоб ставити запитання та бути в курсі останніх новин"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Дізнатися більше про GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Пройти короткий тур по ключовим функціям GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плагіни"===e[1])),themes:e.settings.items.find((e=>"Теми"===e[1])),snippets:e.settings.items.find((e=>"Сніпети"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Теми"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Теми","themes"),id:"gm-home-themes",text:"Теми",selected:!1})),c(t.createElement(a,{style:{display:S||"Плагіни"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плагіни","plugins"),id:"gm-home-plugins",text:"Плагіни",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Сніпети"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Сніпети","snippets"),id:"gm-home-snippets",text:"Сніпети",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Сніпети"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Видалити":"Додати",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Додати",s.buttonText="Додати",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Видалити",s.buttonText="Видалити",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Налаштування":o="settings";break;case"Плагіни":o="plugins";break;case"Теми":o="themes";break;case"Сніпети":o="snippets";break;case"Журнал змін":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Налаштування"),t?void 0:o("Плагіни"),t?void 0:o("Теми"),o("Журнал змін")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Модулі GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Модулі GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плагіни"===e[1]||"Теми"===e[1]||"Сніпети"===e[1])||!t.snippets&&"Сніпети"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Налаштування":o="settings";break;case"Плагіни":o="plugins";break;case"Теми":o="themes";break;case"Сніпети":o="snippets";break;case"Журнал змін":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плагіни"!==t[1]&&"Теми"!==t[1]&&"Сніпети"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плагіни"!==e.target.textContent&&"Теми"!==e.target.textContent&&"Сніпети"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Журнал змін",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Модулі GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Оновити","Потрібно оновити","Цей параметр **потрібно оновити, щоб набув чинності**. У цьому сеансі ви **можете відчути дивну поведінку** перед оновленням.")&&location.reload()};e.settings.createItem("Налаштування",["",{type:"header",text:"Налаштування"},{type:"toggle",text:"Журнал змін GooseMod",subtext:"Показувати кнопку перегляду журналу змін GooseMod у налаштуваннях",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Роздільники у налаштуваннях",subtext:"Показувати роздільники між вкладками налаштувань GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Крамниця на головному екрані",subtext:"Показувати крамницю GooseMod на головному екрані, а не у меню налаштувань",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Крамниця"},{type:"toggle",text:"Автооновлення",subtext:"Автоматично оновлювати репозиторії та модулі кожну годину",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Сповіщення про новий модуль",subtext:"Показувати спливне сповіщення щоразу, коли новий модуль додається до Крамниці",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Зовнішній вигляд"},{type:"toggle",text:"Значки GooseMod",subtext:"Показувати значки пошани користувачів GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Утиліти"},{type:"text-and-button",text:"Очистити кеш",subtext:"Очищує (повністю) майже усі кеши, що використовуються GooseMod",buttonText:"Очистити",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Почати тур",subtext:"Пройти тур функціоналу GooseMod знову",buttonText:"Почати",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Скопіювати інформацію для налагодження",subtext:"Копіює інформацію о установці та GooseMod для звітів та налагодження",buttonText:"Копіювати",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Скинути до заводських налаштувань",subtext:"Повністю скидає налаштування GooseMod: видаляє усі зміни та модулі, як при чистій установці",buttonText:"Скинути",onclick:async()=>{await e.confirmDialog("Скинути","Скинути GooseMod","Підтвердження призведе до повного скидання GooseMod, видалення всіх уподобань і модулів; ніби ви вперше встановили GooseMod. Це необоротно.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервне копіювання"},{type:"text-and-button",text:"Створити резервну копію",subtext:"Створює файл з резервною копією Ваших модулів та налаштувань GooseMod",buttonText:"Створити",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Відновити резервну копію",subtext:"Відновлює ваші модулі та налаштування GooseMod із файлу резервної копії, **відновлюйте тільки довірені резервні копії**",buttonText:"Відновити",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Інтерфейс",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Маленькі зміни, як, наприклад, зміни інтерфейсу, щоб GooseMod виглядав так, як Ви бажаєте"},{type:"toggle",text:"Зображення за замовчуванням",subtext:"Використовувати зображення-заглушку у Крамниці для модулів без зображень",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Складана категорія на головному екрані",subtext:"Дозволяє приховувати категорію на головному екрані натисненням по іконці",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Експериментальне",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Експериментальні налаштування, ймовірно, не закінчені та нестабільні, що може погіршити враження"},{type:"toggle",experimental:!0,text:"Атрибути даних",subtext:"Додає атрибути даних до деяких елементів, які використовуються деякими темами",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Сніпети",subtext:"Увімкнути вкладку сніпетів у крамниці",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Примусово використовувати налаштування тем",subtext:"Примусово використовувати автоматично згенеровані налаштування для всіх тем",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="За рейтингом",i="Усі",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Крамниця":"Встановлені";switch(r){case"За алфавітом":t.style.order="";break;case"За датою оновлення":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"За рейтингом":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Крамниця"!==n&&n!==p||"Усі"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Крамниця";"Крамниця"!==n&&"Встановлені"!==n&&(n="Крамниця"),o.forEach(t);const a=""===d&&"Крамниця"===n&&"Усі"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Нічого не знайдено"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Нічого не знайдено",""!==d&&"Крамниця"===n&&"Усі"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Нічого не знайдено, можливо Ви мали на увазі плагіни?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Нічого не знайдено, можливо Ви мали на увазі теми?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Усі теми"!==c.textContent&&"Усі плагіни"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плагіни","Теми"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Шукати плагіни":"Шукати теми",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортування",options:["За рейтингом","За алфавітом","За датою оновлення"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Усі"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Популярне",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Нещодавно оновлене",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Усі плагіни":"Усі теми"},{type:"gm-footer"}]))),e.settings.createItem("Сніпети",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Журнал змін",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Модулі GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плагіни"===e||"Теми"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Теми":"Плагіни",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Крамниця GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Крамниця GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Крамниця GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Крамниця GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Видалити",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Встановити",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плагіни"===e[1]||"Теми"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Видалити":"Встановити",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Спонсор GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Перекладач GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Розробник GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Офіційний сервер GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Видалити"===this.props.buttonText?"Встановити":"Видалити",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Теми"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плагіни"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Модулі GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Відкрити посилання"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Видалити"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Підтверждено",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Не підтверджено",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Відсутнє",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозиторії"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Недійсний репозиторій",{type:"error",timeout:5e3,subtext:"Неприпустимий формат"});if(!confirm("Зовнішні репозиторії становлять загрозу безпеці, так як вони не контролюються розробниками GooseMod. Ми не є відповідальними за будь-які небезпеки із-за додавання зовнішніх репозиторіїв користувачами.\n\nЯкщо Ви не довіряєте власнику цього репозиторію, не використовуйте його, так як це може поставити під загрозу ваш клієнт Discord.\n\nБудь ласка, підтвердьте додання цього репозиторію натисканням \"OK\"."))return void goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Відхилено сповіщення про безпеку"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Цей репозиторій невідомий і не підтверджений (відсутній PGP), будь ласка, будьте дуже обережні. Пересвідчіться в тому, що Ви можете повністю довіряти власнику(-ам) репозиторію.\n\nЩоб виправити цю проблему, попросіть власника репозиторію додати підтримку PGP.\n\nБудь ласка, підтвердьте додання цього репозиторію натисканням \"OK\".")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Відхилено сповіщення про безпеку"}):goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Помилка підтвердження PGP"})}},"Додати")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Крамниця"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Встановлені")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Оновити",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозиторії",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Теми",confirmText:"Поглянути на теми",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прикрасіть Ваш Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Обирайте з більш ніж 100 тем, щоб відрегулювати та покращити Ваш користувацький інтерфейс"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Плагіни",confirmText:"Поглянути на плагіни",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Прокачайте свій Discord"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Плагіни покращують Ваш досвід використання додатку за рахунок усіляких зручностей"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Крамниця",confirmText:"Заглянути у крамницю на головному екрані",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Шукайте теми та плагіни у крамниці"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod використовує свій власний магазин, у якому Ви легко зможете знайти та встановити модулі"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Налаштування",confirmText:"Заглянути у налаштування GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Налаштування-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Експериментальне",description:"Спробуйте свіжий експериментальний функціонал"},{name:"Утиліти",description:"Робіть резервні копії, скидайте налаштування GooseMod, і так далі"},{name:"Опції",description:"Відрегулюйте GooseMod як душі завгодно"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Налаштуйте GooseMod, щоб підігнати функціонал під себе"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Ви можете змінювати багато різних налаштувань"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Спілка",confirmText:"Долучитися до Discord-серверу GooseMod",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Ставте запитання",description:"Ставте будь-які запитання та отримуйте допомогу"},{name:"Новини",description:"Залишайтеся в курсі новин та анонсів, що стосуються GooseMod та пов\'язаних проєктів"},{name:"Беріть участь",description:"Пропонуйте, допомагайте іншим, і так далі"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Долучитися до спілки GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Долучайтеся до нашого Discord-серверу для додаткової інформації"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Дізнатися більше",cancelText:"Не цікавить",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Крамниця",description:"Дізнатися більше про крамницю GooseMod та про те, що там є"},{name:"Налаштування",description:"Дізнатися більше про налаштування для GooseMod та плагінів"},{name:"Спілка",description:"Долучайтеся до нашого Discord-серверу, щоб ставити запитання та бути в курсі останніх новин"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Дізнатися більше про GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Пройти короткий тур по ключовим функціям GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Плагіни"===e[1])),themes:e.settings.items.find((e=>"Теми"===e[1])),snippets:e.settings.items.find((e=>"Сніпети"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Теми"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Теми","themes"),id:"gm-home-themes",text:"Теми",selected:!1})),c(t.createElement(a,{style:{display:S||"Плагіни"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Плагіни","plugins"),id:"gm-home-plugins",text:"Плагіни",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Сніпети"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Сніпети","snippets"),id:"gm-home-snippets",text:"Сніпети",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Сніпети"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Видалити":"Додати",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Додати",s.buttonText="Додати",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Видалити",s.buttonText="Видалити",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Налаштування":o="settings";break;case"Плагіни":o="plugins";break;case"Теми":o="themes";break;case"Сніпети":o="snippets";break;case"Журнал змін":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Налаштування"),t?void 0:o("Плагіни"),t?void 0:o("Теми"),o("Журнал змін")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Модулі GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Модулі GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Плагіни"===e[1]||"Теми"===e[1]||"Сніпети"===e[1])||!t.snippets&&"Сніпети"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Налаштування":o="settings";break;case"Плагіни":o="plugins";break;case"Теми":o="themes";break;case"Сніпети":o="snippets";break;case"Журнал змін":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Плагіни"!==t[1]&&"Теми"!==t[1]&&"Сніпети"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Плагіни"!==e.target.textContent&&"Теми"!==e.target.textContent&&"Сніпети"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Журнал змін",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Модулі GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Оновити","Потрібно оновити","Цей параметр **потрібно оновити, щоб набув чинності**. У цьому сеансі ви **можете відчути дивну поведінку** перед оновленням.")&&location.reload()};e.settings.createItem("Налаштування",["",{type:"header",text:"Налаштування"},{type:"toggle",text:"Журнал змін GooseMod",subtext:"Показувати кнопку перегляду журналу змін GooseMod у налаштуваннях",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Роздільники у налаштуваннях",subtext:"Показувати роздільники між вкладками налаштувань GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Крамниця на головному екрані",subtext:"Показувати крамницю GooseMod на головному екрані, а не у меню налаштувань",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Крамниця"},{type:"toggle",text:"Автооновлення",subtext:"Автоматично оновлювати репозиторії та модулі кожну годину",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Сповіщення про новий модуль",subtext:"Показувати спливне сповіщення щоразу, коли новий модуль додається до Крамниці",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Зовнішній вигляд"},{type:"toggle",text:"Значки GooseMod",subtext:"Показувати значки пошани користувачів GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Утиліти"},{type:"text-and-button",text:"Очистити кеш",subtext:"Очищує (повністю) майже усі кеши, що використовуються GooseMod",buttonText:"Очистити",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Почати тур",subtext:"Пройти тур функціоналу GooseMod знову",buttonText:"Почати",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Скопіювати інформацію для налагодження",subtext:"Копіює інформацію о установці та GooseMod для звітів та налагодження",buttonText:"Копіювати",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Скинути до заводських налаштувань",subtext:"Повністю скидає налаштування GooseMod: видаляє усі зміни та модулі, як при чистій установці",buttonText:"Скинути",onclick:async()=>{await e.confirmDialog("Скинути","Скинути GooseMod","Підтвердження призведе до повного скидання GooseMod, видалення всіх уподобань і модулів; ніби ви вперше встановили GooseMod. Це необоротно.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Резервне копіювання"},{type:"text-and-button",text:"Створити резервну копію",subtext:"Створює файл з резервною копією Ваших модулів та налаштувань GooseMod",buttonText:"Створити",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Відновити резервну копію",subtext:"Відновлює ваші модулі та налаштування GooseMod із файлу резервної копії, **відновлюйте тільки довірені резервні копії**",buttonText:"Відновити",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Інтерфейс",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Маленькі зміни, як, наприклад, зміни інтерфейсу, щоб GooseMod виглядав так, як Ви бажаєте"},{type:"toggle",text:"Зображення за замовчуванням",subtext:"Використовувати зображення-заглушку у Крамниці для модулів без зображень",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Складана категорія на головному екрані",subtext:"Дозволяє приховувати категорію на головному екрані натисненням по іконці",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Експериментальне",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Експериментальні налаштування, ймовірно, не закінчені та нестабільні, що може погіршити враження"},{type:"toggle",experimental:!0,text:"Атрибути даних",subtext:"Додає атрибути даних до деяких елементів, які використовуються деякими темами",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Сніпети",subtext:"Увімкнути вкладку сніпетів у крамниці",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Примусово використовувати налаштування тем",subtext:"Примусово використовувати автоматично згенеровані налаштування для всіх тем",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="За рейтингом",i="Усі",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Крамниця":"Встановлені";switch(r){case"За алфавітом":t.style.order="";break;case"За датою оновлення":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"За рейтингом":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Крамниця"!==n&&n!==p||"Усі"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Крамниця";"Крамниця"!==n&&"Встановлені"!==n&&(n="Крамниця"),o.forEach(t);const a=""===d&&"Крамниця"===n&&"Усі"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Нічого не знайдено"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Нічого не знайдено",""!==d&&"Крамниця"===n&&"Усі"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Нічого не знайдено, можливо Ви мали на увазі плагіни?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Нічого не знайдено, можливо Ви мали на увазі теми?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Усі теми"!==c.textContent&&"Усі плагіни"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Плагіни","Теми"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Шукати плагіни":"Шукати теми",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Сортування",options:["За рейтингом","За алфавітом","За датою оновлення"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Автор",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Усі"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Популярне",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Нещодавно оновлене",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Усі плагіни":"Усі теми"},{type:"gm-footer"}]))),e.settings.createItem("Сніпети",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Журнал змін",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Модулі GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Плагіни"===e||"Теми"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Теми":"Плагіни",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Крамниця GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Крамниця GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Крамниця GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Крамниця GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Видалити",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Встановити",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Плагіни"===e[1]||"Теми"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Видалити":"Встановити",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Спонсор GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Перекладач GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Розробник GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Офіційний сервер GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Видалити"===this.props.buttonText?"Встановити":"Видалити",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Теми"===e[1]))[2],d=goosemod.settings.items.find((e=>"Плагіни"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Модулі GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Відкрити посилання"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Видалити"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP Підтверждено",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP Не підтверджено",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="PGP Відсутнє",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Репозиторії"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Недійсний репозиторій",{type:"error",timeout:5e3,subtext:"Неприпустимий формат"});if(!confirm("Зовнішні репозиторії становлять загрозу безпеці, так як вони не контролюються розробниками GooseMod. Ми не є відповідальними за будь-які небезпеки із-за додавання зовнішніх репозиторіїв користувачами.\n\nЯкщо Ви не довіряєте власнику цього репозиторію, не використовуйте його, так як це може поставити під загрозу ваш клієнт Discord.\n\nБудь ласка, підтвердьте додання цього репозиторію натисканням \"OK\"."))return void goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Відхилено сповіщення про безпеку"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Цей репозиторій невідомий і не підтверджений (відсутній PGP), будь ласка, будьте дуже обережні. Пересвідчіться в тому, що Ви можете повністю довіряти власнику(-ам) репозиторію.\n\nЩоб виправити цю проблему, попросіть власника репозиторію додати підтримку PGP.\n\nБудь ласка, підтвердьте додання цього репозиторію натисканням \"OK\".")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Відхилено сповіщення про безпеку"}):goosemod.showToast("Додання репозиторію відмінено",{type:"danger",timeout:5e3,subtext:"Помилка підтвердження PGP"})}},"Додати")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Крамниця"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Встановлені")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Оновити",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Репозиторії",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.vi.js b/goosemod.vi.js index 1f213ad9..d8a8904a 100644 --- a/goosemod.vi.js +++ b/goosemod.vi.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Chủ đề",confirmText:"Xem Chủ đề",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Làm đẹp Discord của bạn với Chủ đề"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Chọn hơn 100 chủ đề để tinh chỉnh và cải thiện giao diện sử dụng của bạn"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Tiện ích",confirmText:"Xem Tiện ích",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tùy biến Discord của bạn trong tích tắc"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Các Tiện ích nâng cao trải nghiệm của bạn với các cải tiến ở trong chính ứng dụng"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cửa hàng",confirmText:"Hiển thị Cửa hàng ở Trang chính",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Xem qua Chủ đề và Tiện ích trong Cửa hàng"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod sử dụng cửa hàng riêng, nơi bạn có thể dễ dàng xem qua và cài đặt"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cài đặt",confirmText:"Xem Cài đặt GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Cài đặt-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Các Tính năng Thử nghiệm",description:"Dùng thử các tính năng thử nghiệm"},{name:"Tiện ích",description:"Sao lưu, đặt lại GooseMod, và nhiều hơn nữa"},{name:"Tinh chỉnh",description:"Tinh chỉnh GooseMod theo sở thích"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Sử dụng cài đặt của GooseMod để tùy chỉnh các chức năng"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Có rất nhiều tùy chọn để bạn thay đổi"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cộng đồng",confirmText:"Tham gia GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Hỏi Đáp",description:"Đặt bất kỳ câu hỏi nào và được hỗ trợ"},{name:"Tin Tức",description:"Nhận tin tức mới nhất và các thông báo xung quanh GooseMod và các dự án liên quan"},{name:"Tham gia Đóng Góp",description:"Đóng góp các gợi ý, giúp đỡ người khác, và nhiều nữa"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tham gia Cộng đồng GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Tham gia vào Discord để biết thêm thông tin và nhiều thứ khác"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Tìm Hiểu Thêm",cancelText:"Không quan tâm",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Cửa hàng",description:"Tìm hiểu về Cửa hàng GooseMod và những thứ bên trong"},{name:"Cài đặt",description:"Tìm hiểu về cài đặt cho GooseMod và các tiện ích"},{name:"Cộng đồng",description:"Tham gia vào Discord của chúng tôi để hỏi đáp, góp ý, cập nhật thông tin mới, và nhiều hơn nữa"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tìm hiểu về GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Xem qua bài giới thiệu ngắn các chức năng chính của GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Tiện ích"===e[1])),themes:e.settings.items.find((e=>"Chủ đề"===e[1])),snippets:e.settings.items.find((e=>"Mã thử nghiệm"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Chủ đề"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Chủ đề","themes"),id:"gm-home-themes",text:"Chủ đề",selected:!1})),c(t.createElement(a,{style:{display:S||"Tiện ích"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Tiện ích","plugins"),id:"gm-home-plugins",text:"Tiện ích",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Mã thử nghiệm"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Mã thử nghiệm","snippets"),id:"gm-home-snippets",text:"Mã thử nghiệm",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Mã thử nghiệm"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Loại bỏ":"Thêm",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Thêm",s.buttonText="Thêm",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Loại bỏ",s.buttonText="Loại bỏ",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Cài đặt":o="settings";break;case"Tiện ích":o="plugins";break;case"Chủ đề":o="themes";break;case"Mã thử nghiệm":o="snippets";break;case"Nhật kí Thay đổi":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Cài đặt"),t?void 0:o("Tiện ích"),t?void 0:o("Chủ đề"),o("Nhật kí Thay đổi")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Mô-đun GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Mô-đun GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Tiện ích"===e[1]||"Chủ đề"===e[1]||"Mã thử nghiệm"===e[1])||!t.snippets&&"Mã thử nghiệm"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Cài đặt":o="settings";break;case"Tiện ích":o="plugins";break;case"Chủ đề":o="themes";break;case"Mã thử nghiệm":o="snippets";break;case"Nhật kí Thay đổi":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Tiện ích"!==t[1]&&"Chủ đề"!==t[1]&&"Mã thử nghiệm"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Tiện ích"!==e.target.textContent&&"Chủ đề"!==e.target.textContent&&"Mã thử nghiệm"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Nhật kí Thay đổi",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Mô-đun GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Làm mới","Yêu cầu làm mới","Cài đặt này **yêu cầu làm mới để có hiệu lực**. Bạn **có thể gặp một số lỗi** trong phiên này trước khi làm mới.")&&location.reload()};e.settings.createItem("Cài đặt",["",{type:"header",text:"Cài đặt"},{type:"toggle",text:"Nhật kí thay đổi của GooseMod",subtext:"Hiển thị cài đặt \"Nhật ký thay đổi\" của GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Phân loại Cài đặt chính",subtext:"Phân loại các mục cài đặt chính của GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Cửa hàng ở Trang chính",subtext:"Đặt các tùy chỉnh cho Cửa hàng GooseMod ở trang chính thay vì ở trong cài đặt",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Cửa hàng"},{type:"toggle",text:"Tự động cập nhật",subtext:"Tự động cập nhật các kho lưu trữ và mô-đun mỗi giờ",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Thông báo Mô-đun mới",subtext:"Hiện một thông báo mỗi khi có một mô-đun mới được thêm vào Cửa hàng",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Hiển thị"},{type:"toggle",text:"Huy hiệu GooseMod",subtext:"Hiện Huy hiệu của GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Tiện lợi"},{type:"text-and-button",text:"Xóa bộ nhớ đệm",subtext:"Xóa (loại bỏ hoàn toàn) hầu hết các bộ nhớ đệm mà GooseMod sử dụng",buttonText:"Xóa",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Bắt đầu hướng dẫn",subtext:"Xem qua hướng dẫn sử dụng GooseMod lần nữa",buttonText:"Hướng dẫn",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Sao chép Thông tin Gỡ lỗi",subtext:"Sao chép thông tin về thiết lập và GooseMod để báo cáo và tìm lỗi",buttonText:"Sao chép",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Đặt lại GooseMod",subtext:"Đặt lại hoàn toàn GooseMod: loại bỏ tất cả các tùy chọn và mô-đun đã cài; giống như cài đặt lần đầu tiên",buttonText:"Cài lại",onclick:async()=>{await e.confirmDialog("Cài đặt lại","Cài đặt lại GooseMod","Việc xác nhận sẽ đặt lại hoàn toàn GooseMod, xóa tất cả các tùy chọn và mô-đun; như thể bạn đang cài đặt GooseMod lần đầu tiên. Điều này là không thể thay đổi.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sao lưu"},{type:"text-and-button",text:"Tạo Sao lưu",subtext:"Tạo một tệp để sao lưu các mô-đun và cài đặt GooseMod của bạn",buttonText:"Sao lưu",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Khôi phục lại bản sao lưu",subtext:"Khôi phục cài đặt và mô-đun GooseMod của bạn thông qua tệp sao lưu, **chỉ khôi phục các bản sao lưu mà bạn tin tưởng**",buttonText:"Khôi phục",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tinh chỉnh",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Những thay đổi nhỏ như thay đổi giao diện người dùng để biến GooseMod theo ý bạn"},{type:"toggle",text:"Ảnh dự phòng",subtext:"Sử dụng ảnh dự phòng trong Cửa hàng cho các mô-đun không có hình ảnh",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Danh mục chính có thể thu gọn",subtext:"Cho phép thu gọn danh mục chính thông qua biểu tượng",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Thử nghiệm",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Các cài đặt thử nghiệm hầu hết chưa hoàn thiện và không ổn định, có thể làm giảm trải nghiệm sử dụng"},{type:"toggle",experimental:!0,text:"Thuộc tính dữ liệu",subtext:"Thêm dữ liệu vào một số yếu tố cho một số chủ đề để sử dụng",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Mã thử nghiệm",subtext:"Bật thanh Mã thử nghiệm trong Cửa hàng",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Bật cài đặt chủ đề",subtext:"Buộc dùng các cài đặt được tạo tự động cho tất cả các chủ đề",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Số sao",i="Tất cả",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Cửa hàng":"Đã cài đặt";switch(r){case"A-Z":t.style.order="";break;case"Cập nhật lần cuối":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Số sao":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Cửa hàng"!==n&&n!==p||"Tất cả"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Cửa hàng";"Cửa hàng"!==n&&"Đã cài đặt"!==n&&(n="Cửa hàng"),o.forEach(t);const a=""===d&&"Cửa hàng"===n&&"Tất cả"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Không tìm thấy"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Không tìm thấy",""!==d&&"Cửa hàng"===n&&"Tất cả"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Không tìm thấy, ý bạn là muốn tìm tiện ích?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Không tìm thấy, ý bạn là muốn tìm chủ đề?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tất cả Chủ đề"!==c.textContent&&"Tất cả Tiện ích"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Tiện ích","Chủ đề"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Tìm Tiện ích":"Tìm Chủ đề",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sắp xếp theo",options:["Số sao","A-Z","Cập nhật lần cuối"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Tác giả",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tất cả"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Được gắn sao nhiều nhất",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Mới cập nhật gần đây",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tất cả Tiện ích":"Tất cả Chủ đề"},{type:"gm-footer"}]))),e.settings.createItem("Mã thử nghiệm",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Nhật kí Thay đổi",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Mô-đun GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Tiện ích"===e||"Chủ đề"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Chủ đề":"Tiện ích",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Cửa hàng GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Cửa hàng GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Cửa hàng GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Cửa hàng GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Loại bỏ",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Cài đặt",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Tiện ích"===e[1]||"Chủ đề"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Loại bỏ":"Cài đặt",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Nhà tài trợ GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Người phiên dịch GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Nhà phát triển GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Server Discord chính thức của GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Loại bỏ"===this.props.buttonText?"Cài đặt":"Loại bỏ",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Chủ đề"===e[1]))[2],d=goosemod.settings.items.find((e=>"Tiện ích"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Mô-đun GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Mở liên kết"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Loại bỏ"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP đã xác minh",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP không đáng tin cậy",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Không có PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Kho ứng dụng"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Kho lưu trữ không hợp lệ",{type:"error",timeout:5e3,subtext:"Định dạng không hợp lệ"});if(!confirm("Các kho lưu trữ bên ngoài gây ra rủi ro bảo mật vì chúng không được kiểm soát bởi các nhà phát triển GooseMod. Chúng tôi không chịu trách nhiệm về bất kỳ nguy hiểm nào do các kho lưu trữ bên ngoài do người dùng thêm vào.\n\nNếu bạn không tin tưởng chủ sở hữu của kho lưu trữ này, đừng sử dụng nó vì nó có thể ảnh hưởng đến cài đặt Discord của bạn.\n\nVui lòng xác nhận việc thêm kho lưu trữ này bằng cách nhấn OK."))return void goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Đã bác bỏ Lời nhắc Bảo mật"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Kho lưu trữ này không được biết đến hoặc đáng tin cậy (không có xác minh PGP), hãy hết sức cẩn thận. Đảm bảo rằng bạn hoàn toàn tin tưởng (các) chủ sở hữu của kho này.\n\nĐể giải quyết vấn đề này, hãy yêu cầu người bảo trì kho lưu trữ thêm hỗ trợ PGP.\n\nVui lòng xác nhận lại việc thêm kho lưu trữ này bằng cách nhấn OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Đã bác bỏ Lời nhắc Bảo mật"}):goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Lỗi PGP không đáng tin cậy"})}},"Thêm")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Cửa hàng"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Đã cài đặt")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Làm mới",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Kho ứng dụng",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Chủ đề",confirmText:"Xem Chủ đề",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Làm đẹp Discord của bạn với Chủ đề"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Chọn hơn 100 chủ đề để tinh chỉnh và cải thiện giao diện sử dụng của bạn"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Tiện ích",confirmText:"Xem Tiện ích",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tùy biến Discord của bạn trong tích tắc"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Các Tiện ích nâng cao trải nghiệm của bạn với các cải tiến ở trong chính ứng dụng"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cửa hàng",confirmText:"Hiển thị Cửa hàng ở Trang chính",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"Xem qua Chủ đề và Tiện ích trong Cửa hàng"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod sử dụng cửa hàng riêng, nơi bạn có thể dễ dàng xem qua và cài đặt"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cài đặt",confirmText:"Xem Cài đặt GooseMod",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-Cài đặt-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Các Tính năng Thử nghiệm",description:"Dùng thử các tính năng thử nghiệm"},{name:"Tiện ích",description:"Sao lưu, đặt lại GooseMod, và nhiều hơn nữa"},{name:"Tinh chỉnh",description:"Tinh chỉnh GooseMod theo sở thích"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Sử dụng cài đặt của GooseMod để tùy chỉnh các chức năng"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Có rất nhiều tùy chọn để bạn thay đổi"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"Cộng đồng",confirmText:"Tham gia GooseMod Discord",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Hỏi Đáp",description:"Đặt bất kỳ câu hỏi nào và được hỗ trợ"},{name:"Tin Tức",description:"Nhận tin tức mới nhất và các thông báo xung quanh GooseMod và các dự án liên quan"},{name:"Tham gia Đóng Góp",description:"Đóng góp các gợi ý, giúp đỡ người khác, và nhiều nữa"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tham gia Cộng đồng GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Tham gia vào Discord để biết thêm thông tin và nhiều thứ khác"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"Tìm Hiểu Thêm",cancelText:"Không quan tâm",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"Cửa hàng",description:"Tìm hiểu về Cửa hàng GooseMod và những thứ bên trong"},{name:"Cài đặt",description:"Tìm hiểu về cài đặt cho GooseMod và các tiện ích"},{name:"Cộng đồng",description:"Tham gia vào Discord của chúng tôi để hỏi đáp, góp ý, cập nhật thông tin mới, và nhiều hơn nữa"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"Tìm hiểu về GooseMod"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"Xem qua bài giới thiệu ngắn các chức năng chính của GooseMod"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"Tiện ích"===e[1])),themes:e.settings.items.find((e=>"Chủ đề"===e[1])),snippets:e.settings.items.find((e=>"Mã thử nghiệm"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"Chủ đề"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("Chủ đề","themes"),id:"gm-home-themes",text:"Chủ đề",selected:!1})),c(t.createElement(a,{style:{display:S||"Tiện ích"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("Tiện ích","plugins"),id:"gm-home-plugins",text:"Tiện ích",selected:!1})),k?c(t.createElement(a,{style:{display:S||"Mã thử nghiệm"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("Mã thử nghiệm","snippets"),id:"gm-home-snippets",text:"Mã thử nghiệm",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"Mã thử nghiệm"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"Loại bỏ":"Thêm",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="Thêm",s.buttonText="Thêm",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="Loại bỏ",s.buttonText="Loại bỏ",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"Cài đặt":o="settings";break;case"Tiện ích":o="plugins";break;case"Chủ đề":o="themes";break;case"Mã thử nghiệm":o="snippets";break;case"Nhật kí Thay đổi":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("Cài đặt"),t?void 0:o("Tiện ích"),t?void 0:o("Chủ đề"),o("Nhật kí Thay đổi")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"Mô-đun GooseMod",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"Mô-đun GooseMod"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("Tiện ích"===e[1]||"Chủ đề"===e[1]||"Mã thử nghiệm"===e[1])||!t.snippets&&"Mã thử nghiệm"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"Cài đặt":o="settings";break;case"Tiện ích":o="plugins";break;case"Chủ đề":o="themes";break;case"Mã thử nghiệm":o="snippets";break;case"Nhật kí Thay đổi":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"Tiện ích"!==t[1]&&"Chủ đề"!==t[1]&&"Mã thử nghiệm"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"Tiện ích"!==e.target.textContent&&"Chủ đề"!==e.target.textContent&&"Mã thử nghiệm"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","Nhật kí Thay đổi",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"Mô-đun GooseMod"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("Làm mới","Yêu cầu làm mới","Cài đặt này **yêu cầu làm mới để có hiệu lực**. Bạn **có thể gặp một số lỗi** trong phiên này trước khi làm mới.")&&location.reload()};e.settings.createItem("Cài đặt",["",{type:"header",text:"Cài đặt"},{type:"toggle",text:"Nhật kí thay đổi của GooseMod",subtext:"Hiển thị cài đặt \"Nhật ký thay đổi\" của GooseMod",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"Phân loại Cài đặt chính",subtext:"Phân loại các mục cài đặt chính của GooseMod",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"Cửa hàng ở Trang chính",subtext:"Đặt các tùy chỉnh cho Cửa hàng GooseMod ở trang chính thay vì ở trong cài đặt",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"Cửa hàng"},{type:"toggle",text:"Tự động cập nhật",subtext:"Tự động cập nhật các kho lưu trữ và mô-đun mỗi giờ",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"Thông báo Mô-đun mới",subtext:"Hiện một thông báo mỗi khi có một mô-đun mới được thêm vào Cửa hàng",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"Hiển thị"},{type:"toggle",text:"Huy hiệu GooseMod",subtext:"Hiện Huy hiệu của GooseMod",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"Tiện lợi"},{type:"text-and-button",text:"Xóa bộ nhớ đệm",subtext:"Xóa (loại bỏ hoàn toàn) hầu hết các bộ nhớ đệm mà GooseMod sử dụng",buttonText:"Xóa",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"Bắt đầu hướng dẫn",subtext:"Xem qua hướng dẫn sử dụng GooseMod lần nữa",buttonText:"Hướng dẫn",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"Sao chép Thông tin Gỡ lỗi",subtext:"Sao chép thông tin về thiết lập và GooseMod để báo cáo và tìm lỗi",buttonText:"Sao chép",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"Đặt lại GooseMod",subtext:"Đặt lại hoàn toàn GooseMod: loại bỏ tất cả các tùy chọn và mô-đun đã cài; giống như cài đặt lần đầu tiên",buttonText:"Cài lại",onclick:async()=>{await e.confirmDialog("Cài đặt lại","Cài đặt lại GooseMod","Việc xác nhận sẽ đặt lại hoàn toàn GooseMod, xóa tất cả các tùy chọn và mô-đun; như thể bạn đang cài đặt GooseMod lần đầu tiên. Điều này là không thể thay đổi.")&&(await e.remove(),window.location.reload())}},{type:"header",text:"Sao lưu"},{type:"text-and-button",text:"Tạo Sao lưu",subtext:"Tạo một tệp để sao lưu các mô-đun và cài đặt GooseMod của bạn",buttonText:"Sao lưu",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"Khôi phục lại bản sao lưu",subtext:"Khôi phục cài đặt và mô-đun GooseMod của bạn thông qua tệp sao lưu, **chỉ khôi phục các bản sao lưu mà bạn tin tưởng**",buttonText:"Khôi phục",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"Tinh chỉnh",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Những thay đổi nhỏ như thay đổi giao diện người dùng để biến GooseMod theo ý bạn"},{type:"toggle",text:"Ảnh dự phòng",subtext:"Sử dụng ảnh dự phòng trong Cửa hàng cho các mô-đun không có hình ảnh",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"Danh mục chính có thể thu gọn",subtext:"Cho phép thu gọn danh mục chính thông qua biểu tượng",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"Thử nghiệm",collapsed:!0,collapseOffset:1},{type:"subtext",text:"Các cài đặt thử nghiệm hầu hết chưa hoàn thiện và không ổn định, có thể làm giảm trải nghiệm sử dụng"},{type:"toggle",experimental:!0,text:"Thuộc tính dữ liệu",subtext:"Thêm dữ liệu vào một số yếu tố cho một số chủ đề để sử dụng",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"Mã thử nghiệm",subtext:"Bật thanh Mã thử nghiệm trong Cửa hàng",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"Bật cài đặt chủ đề",subtext:"Buộc dùng các cài đặt được tạo tự động cho tất cả các chủ đề",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="Số sao",i="Tất cả",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"Cửa hàng":"Đã cài đặt";switch(r){case"A-Z":t.style.order="";break;case"Cập nhật lần cuối":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"Số sao":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"Cửa hàng"!==n&&n!==p||"Tất cả"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"Cửa hàng";"Cửa hàng"!==n&&"Đã cài đặt"!==n&&(n="Cửa hàng"),o.forEach(t);const a=""===d&&"Cửa hàng"===n&&"Tất cả"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"Không tìm thấy"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="Không tìm thấy",""!==d&&"Cửa hàng"===n&&"Tất cả"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Không tìm thấy, ý bạn là muốn tìm tiện ích?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="Không tìm thấy, ý bạn là muốn tìm chủ đề?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"Tất cả Chủ đề"!==c.textContent&&"Tất cả Tiện ích"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["Tiện ích","Chủ đề"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"Tìm Tiện ích":"Tìm Chủ đề",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"Sắp xếp theo",options:["Số sao","A-Z","Cập nhật lần cuối"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"Tác giả",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("Tất cả"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"Được gắn sao nhiều nhất",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"Mới cập nhật gần đây",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"Tất cả Tiện ích":"Tất cả Chủ đề"},{type:"gm-footer"}]))),e.settings.createItem("Mã thử nghiệm",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("Nhật kí Thay đổi",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("Mô-đun GooseMod"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"Tiện ích"===e||"Chủ đề"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"Chủ đề":"Tiện ích",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"Cửa hàng GooseMod"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"Cửa hàng GooseMod"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"Cửa hàng GooseMod"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"Cửa hàng GooseMod"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="Loại bỏ",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="Cài đặt",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"Tiện ích"===e[1]||"Chủ đề"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"Loại bỏ":"Cài đặt",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("Nhà tài trợ GooseMod","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("Người phiên dịch GooseMod","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("Nhà phát triển GooseMod","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("Server Discord chính thức của GooseMod","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="Loại bỏ"===this.props.buttonText?"Cài đặt":"Loại bỏ",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"Chủ đề"===e[1]))[2],d=goosemod.settings.items.find((e=>"Tiện ích"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"Mô-đun GooseMod")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"Mở liên kết"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"Loại bỏ"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="PGP đã xác minh",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="PGP không đáng tin cậy",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="Không có PGP",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"Kho ứng dụng"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("Kho lưu trữ không hợp lệ",{type:"error",timeout:5e3,subtext:"Định dạng không hợp lệ"});if(!confirm("Các kho lưu trữ bên ngoài gây ra rủi ro bảo mật vì chúng không được kiểm soát bởi các nhà phát triển GooseMod. Chúng tôi không chịu trách nhiệm về bất kỳ nguy hiểm nào do các kho lưu trữ bên ngoài do người dùng thêm vào.\n\nNếu bạn không tin tưởng chủ sở hữu của kho lưu trữ này, đừng sử dụng nó vì nó có thể ảnh hưởng đến cài đặt Discord của bạn.\n\nVui lòng xác nhận việc thêm kho lưu trữ này bằng cách nhấn OK."))return void goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Đã bác bỏ Lời nhắc Bảo mật"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("Kho lưu trữ này không được biết đến hoặc đáng tin cậy (không có xác minh PGP), hãy hết sức cẩn thận. Đảm bảo rằng bạn hoàn toàn tin tưởng (các) chủ sở hữu của kho này.\n\nĐể giải quyết vấn đề này, hãy yêu cầu người bảo trì kho lưu trữ thêm hỗ trợ PGP.\n\nVui lòng xác nhận lại việc thêm kho lưu trữ này bằng cách nhấn OK.")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Đã bác bỏ Lời nhắc Bảo mật"}):goosemod.showToast("Đã hủy thêm kho lưu trữ",{type:"danger",timeout:5e3,subtext:"Lỗi PGP không đáng tin cậy"})}},"Thêm")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"Cửa hàng"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"Đã cài đặt")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"Làm mới",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"Kho ứng dụng",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.zh-CN.js b/goosemod.zh-CN.js index e24b276f..bbef53f1 100644 --- a/goosemod.zh-CN.js +++ b/goosemod.zh-CN.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"主题",confirmText:"浏览主题",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"安装主题来美化你的Discord客户端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"从上百种主题中自定义您的客户端界面"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"插件",confirmText:"浏览插件",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"随心所欲的自定义您的Discord客户端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"插件可彻底改进您的用户体验"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"商店",confirmText:"跳转至商店页面",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"在商店里浏览各式各样的主题与插件"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod有自己的商店,为浏览与安装模组提供了便利"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"设置",confirmText:"查看GooseMod设置",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-设置-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"实验功能",description:"来试用新鲜出炉的实验功能"},{name:"实用的工具",description:"随时创造备份,恢复GooseMod至出厂设置等"},{name:"模组支持",description:"随心所欲的自定义 GooseMod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"使用GooseMod的设置界面来自定义各项功能"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"琳琅满目的选项"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"社区",confirmText:"加入GooseMod的官方Discord服务器",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"询问问题",description:"问任何问题并得到解答"},{name:"新闻",description:"第一时间得到GooseMod官方发布的最新消息"},{name:"参与进社区",description:"帮助其他人回答疑难杂症"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"加入GooseMod的社区"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"加入我们的Discord服务器"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"了解更多",cancelText:"暂无兴趣",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"商店",description:"了解GooseMod商店以及其中的内容"},{name:"设置",description:"了解GooseMod的设置和插件"},{name:"社区",description:"加入我们的Discord服务器来问问题,回馈使用体验,以及实时跟随开发进度"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"了解关于GooseMod的一切"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"本向导将带领您了解GooseMod的核心功能"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"插件"===e[1])),themes:e.settings.items.find((e=>"主题"===e[1])),snippets:e.settings.items.find((e=>"小插件"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"主题"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("主题","themes"),id:"gm-home-themes",text:"主题",selected:!1})),c(t.createElement(a,{style:{display:S||"插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("插件","plugins"),id:"gm-home-plugins",text:"插件",selected:!1})),k?c(t.createElement(a,{style:{display:S||"小插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("小插件","snippets"),id:"gm-home-snippets",text:"小插件",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"小插件"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"卸载":"下载",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="下载",s.buttonText="下载",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="卸载",s.buttonText="卸载",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"设置":o="settings";break;case"插件":o="plugins";break;case"主题":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("设置"),t?void 0:o("插件"),t?void 0:o("主题"),o("更新日志")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 模组",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 模组"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("插件"===e[1]||"主题"===e[1]||"小插件"===e[1])||!t.snippets&&"小插件"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"设置":o="settings";break;case"插件":o="plugins";break;case"主题":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"插件"!==t[1]&&"主题"!==t[1]&&"小插件"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"插件"!==e.target.textContent&&"主题"!==e.target.textContent&&"小插件"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","更新日志",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 模组"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("刷新","必须刷新","此设置**必须刷新后才会有效**。刷新前可能会遇到一些**奇怪的行为**。")&&location.reload()};e.settings.createItem("设置",["",{type:"header",text:"设置"},{type:"toggle",text:"GooseMod 更新日志",subtext:"在 GooseMod 设置里显示 “更新日志”",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"单独显示重要设置",subtext:"在 GooseMod 设置里用横杠区分开核心设置和其他设置",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"将商店放在主菜单",subtext:"将 GooseMod 商店一栏放在主菜单而非用户设定里",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"商店"},{type:"toggle",text:"自动更新",subtext:"将每小时更新源和模组内容",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新模组通知",subtext:"商店有新模组时,显示通知",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外观"},{type:"toggle",text:"GooseMod 徽章",subtext:"显示 GooseMod 的自定义徽章",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"实用工具"},{type:"text-and-button",text:"重置缓存",subtext:"删除大部分 GooseMod 正在使用的缓存",buttonText:"重置",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"开始向导",subtext:"重新过一遍 GooseMod 的初始向导",buttonText:"开始",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"复制调试信息",subtext:"将复制 GooseMod 的调试信息方便提交",buttonText:"复制",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"重置 GooseMod",subtext:"完全重装 GooseMod:删除所有模组并恢复出厂设置",buttonText:"重置",onclick:async()=>{await e.confirmDialog("重置","重置 Goosemod","确认将完全重置 GooseMod,删除所有首选项和模组;就像您第一次安装了GooseMod 一样。这是不可逆转的。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"备份"},{type:"text-and-button",text:"创建备份",subtext:"将备份目前 GooseMod 的模组和设置",buttonText:"备份",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"恢复备份",subtext:"从一个备份里恢复 GooseMod 的模组和设置(**不要恢复您不信任的备份**)",buttonText:"回档",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"细微调整",collapsed:!0,collapseOffset:1},{type:"subtext",text:"一些细微的设置能让你更深度自定义 GooseMod"},{type:"toggle",text:"占位图片",subtext:"让商店里没有图片的模组显示一张占位图",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"可折叠条目",subtext:"让 GooseMod 在 Discord 首页的条目可以折叠",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"测试功能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"测试功能一般都是不稳定的半成品,并极大可能会降低 GooseMod 的体验"},{type:"toggle",experimental:!0,text:"额外数据标签",subtext:"一些主题需要这些额外的数据标签来运行",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"小插件",subtext:"在商店中显示小型插件一栏",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"强制主题设置",subtext:"将强制所有主题使用系统生成的设置",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="下载数",i="全部",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"商店":"已安装";switch(r){case"A-Z":t.style.order="";break;case"更新时间":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"下载数":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"商店"!==n&&n!==p||"全部"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"商店";"商店"!==n&&"已安装"!==n&&(n="商店"),o.forEach(t);const a=""===d&&"商店"===n&&"全部"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"没有找到任何结果"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="没有找到任何结果",""!==d&&"商店"===n&&"全部"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="没有找到任何结果,或许你想找的是个插件?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="没有找到任何结果,或许你想找的是个主题?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"所有主题"!==c.textContent&&"所有插件"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["插件","主题"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"搜索":"搜索",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"排序",options:["下载数","A-Z","更新时间"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("全部"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"最高下载数",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最近更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"所有插件":"所有主题"},{type:"gm-footer"}]))),e.settings.createItem("小插件",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("更新日志",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 模组"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"插件"===e||"主题"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"主题":"插件",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 商店"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 商店"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="卸载",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="安装",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"插件"===e[1]||"主题"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"卸载":"安装",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 捐赠者","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻译者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 开发者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 官方 Discord 服务器","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="卸载"===this.props.buttonText?"安装":"卸载",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"主题"===e[1]))[2],d=goosemod.settings.items.find((e=>"插件"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 模组")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"开启链接"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"卸载"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="已通过 PGP 验证",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="未通过 PGP 验证",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="无 PGP 验证",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"源"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("源无效",{type:"error",timeout:5e3,subtext:"格式错误"});if(!confirm("GooseMod 的开发者将无法保证第三方源的模组质量。\n\n如果您对此源的开发者并不熟悉,请不要加这个源。\n\n按下面的 OK 来确认您已知悉增加第三方源的风险。"))return void goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"确认取消"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("此第三方源没有通过 PGP 验证,请在加入此源之前确认源开发者的可信度。\n\n如想解决这个问题,请要求源开发者增加 PGP 支持。\n\n按下面的 OK 来确认您信任此源开发者并且要订阅这个源。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"确认取消"}):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"PGP 信任错误"})}},"下载")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"商店"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"已安装")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"刷新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"源",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"主题",confirmText:"浏览主题",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"安装主题来美化你的Discord客户端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"从上百种主题中自定义您的客户端界面"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"插件",confirmText:"浏览插件",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"随心所欲的自定义您的Discord客户端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"插件可彻底改进您的用户体验"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"商店",confirmText:"跳转至商店页面",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"在商店里浏览各式各样的主题与插件"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod有自己的商店,为浏览与安装模组提供了便利"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"设置",confirmText:"查看GooseMod设置",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-设置-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"实验功能",description:"来试用新鲜出炉的实验功能"},{name:"实用的工具",description:"随时创造备份,恢复GooseMod至出厂设置等"},{name:"模组支持",description:"随心所欲的自定义 GooseMod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"使用GooseMod的设置界面来自定义各项功能"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"琳琅满目的选项"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"社区",confirmText:"加入GooseMod的官方Discord服务器",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"询问问题",description:"问任何问题并得到解答"},{name:"新闻",description:"第一时间得到GooseMod官方发布的最新消息"},{name:"参与进社区",description:"帮助其他人回答疑难杂症"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"加入GooseMod的社区"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"加入我们的Discord服务器"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"了解更多",cancelText:"暂无兴趣",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"商店",description:"了解GooseMod商店以及其中的内容"},{name:"设置",description:"了解GooseMod的设置和插件"},{name:"社区",description:"加入我们的Discord服务器来问问题,回馈使用体验,以及实时跟随开发进度"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"了解关于GooseMod的一切"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"本向导将带领您了解GooseMod的核心功能"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"插件"===e[1])),themes:e.settings.items.find((e=>"主题"===e[1])),snippets:e.settings.items.find((e=>"小插件"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"主题"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("主题","themes"),id:"gm-home-themes",text:"主题",selected:!1})),c(t.createElement(a,{style:{display:S||"插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("插件","plugins"),id:"gm-home-plugins",text:"插件",selected:!1})),k?c(t.createElement(a,{style:{display:S||"小插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("小插件","snippets"),id:"gm-home-snippets",text:"小插件",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"小插件"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"卸载":"下载",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="下载",s.buttonText="下载",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="卸载",s.buttonText="卸载",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"设置":o="settings";break;case"插件":o="plugins";break;case"主题":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("设置"),t?void 0:o("插件"),t?void 0:o("主题"),o("更新日志")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 模组",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 模组"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("插件"===e[1]||"主题"===e[1]||"小插件"===e[1])||!t.snippets&&"小插件"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"设置":o="settings";break;case"插件":o="plugins";break;case"主题":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"插件"!==t[1]&&"主题"!==t[1]&&"小插件"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"插件"!==e.target.textContent&&"主题"!==e.target.textContent&&"小插件"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","更新日志",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 模组"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("刷新","必须刷新","此设置**必须刷新后才会有效**。刷新前可能会遇到一些**奇怪的行为**。")&&location.reload()};e.settings.createItem("设置",["",{type:"header",text:"设置"},{type:"toggle",text:"GooseMod 更新日志",subtext:"在 GooseMod 设置里显示 “更新日志”",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"单独显示重要设置",subtext:"在 GooseMod 设置里用横杠区分开核心设置和其他设置",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"将商店放在主菜单",subtext:"将 GooseMod 商店一栏放在主菜单而非用户设定里",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"商店"},{type:"toggle",text:"自动更新",subtext:"将每小时更新源和模组内容",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新模组通知",subtext:"商店有新模组时,显示通知",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外观"},{type:"toggle",text:"GooseMod 徽章",subtext:"显示 GooseMod 的自定义徽章",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"实用工具"},{type:"text-and-button",text:"重置缓存",subtext:"删除大部分 GooseMod 正在使用的缓存",buttonText:"重置",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"开始向导",subtext:"重新过一遍 GooseMod 的初始向导",buttonText:"开始",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"复制调试信息",subtext:"将复制 GooseMod 的调试信息方便提交",buttonText:"复制",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"重置 GooseMod",subtext:"完全重装 GooseMod:删除所有模组并恢复出厂设置",buttonText:"重置",onclick:async()=>{await e.confirmDialog("重置","重置 Goosemod","确认将完全重置 GooseMod,删除所有首选项和模组;就像您第一次安装了GooseMod 一样。这是不可逆转的。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"备份"},{type:"text-and-button",text:"创建备份",subtext:"将备份目前 GooseMod 的模组和设置",buttonText:"备份",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"恢复备份",subtext:"从一个备份里恢复 GooseMod 的模组和设置(**不要恢复您不信任的备份**)",buttonText:"回档",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"细微调整",collapsed:!0,collapseOffset:1},{type:"subtext",text:"一些细微的设置能让你更深度自定义 GooseMod"},{type:"toggle",text:"占位图片",subtext:"让商店里没有图片的模组显示一张占位图",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"可折叠条目",subtext:"让 GooseMod 在 Discord 首页的条目可以折叠",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"测试功能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"测试功能一般都是不稳定的半成品,并极大可能会降低 GooseMod 的体验"},{type:"toggle",experimental:!0,text:"额外数据标签",subtext:"一些主题需要这些额外的数据标签来运行",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"小插件",subtext:"在商店中显示小型插件一栏",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"强制主题设置",subtext:"将强制所有主题使用系统生成的设置",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="下载数",i="全部",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"商店":"已安装";switch(r){case"A-Z":t.style.order="";break;case"更新时间":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"下载数":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"商店"!==n&&n!==p||"全部"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"商店";"商店"!==n&&"已安装"!==n&&(n="商店"),o.forEach(t);const a=""===d&&"商店"===n&&"全部"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"没有找到任何结果"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="没有找到任何结果",""!==d&&"商店"===n&&"全部"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="没有找到任何结果,或许你想找的是个插件?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="没有找到任何结果,或许你想找的是个主题?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"所有主题"!==c.textContent&&"所有插件"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["插件","主题"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"搜索":"搜索",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"排序",options:["下载数","A-Z","更新时间"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("全部"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"最高下载数",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最近更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"所有插件":"所有主题"},{type:"gm-footer"}]))),e.settings.createItem("小插件",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("更新日志",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 模组"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"插件"===e||"主题"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"主题":"插件",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 商店"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 商店"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="卸载",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="安装",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"插件"===e[1]||"主题"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"卸载":"安装",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 捐赠者","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻译者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 开发者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 官方 Discord 服务器","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="卸载"===this.props.buttonText?"安装":"卸载",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"主题"===e[1]))[2],d=goosemod.settings.items.find((e=>"插件"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 模组")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"开启链接"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"卸载"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="已通过 PGP 验证",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="未通过 PGP 验证",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="无 PGP 验证",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"源"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("源无效",{type:"error",timeout:5e3,subtext:"格式错误"});if(!confirm("GooseMod 的开发者将无法保证第三方源的模组质量。\n\n如果您对此源的开发者并不熟悉,请不要加这个源。\n\n按下面的 OK 来确认您已知悉增加第三方源的风险。"))return void goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"确认取消"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("此第三方源没有通过 PGP 验证,请在加入此源之前确认源开发者的可信度。\n\n如想解决这个问题,请要求源开发者增加 PGP 支持。\n\n按下面的 OK 来确认您信任此源开发者并且要订阅这个源。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"确认取消"}):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"PGP 信任错误"})}},"下载")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"商店"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"已安装")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"刷新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"源",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/goosemod.zh-TW.js b/goosemod.zh-TW.js index a3cb864f..9f4b66b5 100644 --- a/goosemod.zh-TW.js +++ b/goosemod.zh-TW.js @@ -1 +1 @@ -(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"主題",confirmText:"瀏覽主題",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"安裝主題來美化你的Discord客戶端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"從上百種主題中自定義您的客戶端界面"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"插件",confirmText:"瀏覽插件",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"隨心所欲的自定義您的Discord客戶端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"插件可徹底改進您的用戶體驗"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"商店",confirmText:"跳轉至商店頁面",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"在商店裏瀏覽各式各樣的主題與插件"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod有自己的商店,為瀏覽與安裝模組提供了便利"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"設定",confirmText:"查看GooseMod設定",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-設定-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"實驗功能",description:"來試用新鮮出爐的實驗功能"},{name:"實用的工具",description:"隨時創造備份,重灌GooseMod等"},{name:"模組支持",description:"隨心所欲的自定義GooseMod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"使用GooseMod來自定義各種功能"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"琳琅滿目的選項"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"社群",confirmText:"加入GooseMod的官方Discord伺服器",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"詢問問題",description:"詢問任何問題並得到解答"},{name:"新聞",description:"第一時間得到GooseMod官方發佈的最新消息"},{name:"參與進社區",description:"幫助其他人回答疑難雜症"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"加入GooseMod的社區"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"加入我們的Discord伺服器"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"瞭解更多",cancelText:"沒有興趣",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"商店",description:"瞭解GooseMod商店以及裏面的内容"},{name:"設定",description:"瞭解GooseMod的設定和插件"},{name:"社群",description:"加入我們的Discord伺服器來問問題,給予開發團隊建議以及使用體驗,和實時跟隨開發進度"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"瞭解關於GooseMod的一切"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"本向導將帶領您瞭解GooseMod的核心功能"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"插件"===e[1])),themes:e.settings.items.find((e=>"主題"===e[1])),snippets:e.settings.items.find((e=>"小插件"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"主題"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("主題","themes"),id:"gm-home-themes",text:"主題",selected:!1})),c(t.createElement(a,{style:{display:S||"插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("插件","plugins"),id:"gm-home-plugins",text:"插件",selected:!1})),k?c(t.createElement(a,{style:{display:S||"小插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("小插件","snippets"),id:"gm-home-snippets",text:"小插件",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"小插件"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"移除":"下載",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="下載",s.buttonText="下載",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="移除",s.buttonText="移除",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"設定":o="settings";break;case"插件":o="plugins";break;case"主題":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("設定"),t?void 0:o("插件"),t?void 0:o("主題"),o("更新日志")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 模組",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 模組"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("插件"===e[1]||"主題"===e[1]||"小插件"===e[1])||!t.snippets&&"小插件"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"設定":o="settings";break;case"插件":o="plugins";break;case"主題":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"插件"!==t[1]&&"主題"!==t[1]&&"小插件"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"插件"!==e.target.textContent&&"主題"!==e.target.textContent&&"小插件"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","更新日志",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 模組"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("刷新","必須刷新","此設定**必須刷新後才會有效**。刷新前可能會遇到一些**奇怪的行為**。")&&location.reload()};e.settings.createItem("設定",["",{type:"header",text:"設定"},{type:"toggle",text:"GooseMod 更新日誌",subtext:"在 GooseMod 設定中顯示「更新日誌」",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"單獨顯示重要設定",subtext:"在 GooseMod 設定中用橫杠區分開核心設定與其他設定",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"將商店放在主菜單",subtext:"將 GooseMod 商店一欄放在主菜單而非使用者設定裏",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"商店"},{type:"toggle",text:"自動更新",subtext:"將每小時更新源和模組内容",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新模組通知",subtext:"商店有新模組時,顯示通知",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外觀"},{type:"toggle",text:"GooseMod 徽章",subtext:"顯示 GooseMod 的自定義徽章",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"實用工具"},{type:"text-and-button",text:"重灌緩存",subtext:"重灌大部分 GooseMod 的緩存",buttonText:"重置",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"開始向導",subtext:"重新開啓 GooseMod 的初始向導",buttonText:"開始",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"複製調製訊息",subtext:"將複製 GooseMod 的調試訊息方便提交",buttonText:"複製",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"重置 GooseMod",subtext:"完全重灌 GooseMod:移除所有的模組以及設定",buttonText:"重置",onclick:async()=>{await e.confirmDialog("重置","重置 Goosemod","確認將完全重置 GooseMod,刪除所有首選項和模組;就像您第一次安裝 GooseMod 一樣。這是不可逆的。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"備份"},{type:"text-and-button",text:"創建備份",subtext:"將備份目前 GooseMod 的模組和設定",buttonText:"備份",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"恢復備份",subtext:"從一個備份裏恢復 GooseMod 的模組和設定(**不要恢復您不信任的備份**)",buttonText:"回檔",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"小調整",collapsed:!0,collapseOffset:1},{type:"subtext",text:"一些細微的調整能讓你更加深度客制化 GooseMod"},{type:"toggle",text:"占位圖",subtext:"能讓商店裏沒有圖片的模組顯示一張占位的圖片",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"可摺叠的條目",subtext:"讓 GooseMod 在首頁的條目可以摺叠",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"測試功能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"測試中的功能基本都是未開發完畢的半成品,並極大可能會降低 GooseMod 的體驗"},{type:"toggle",experimental:!0,text:"額外數據標簽",subtext:"一些主題依賴於這些額外的數據標簽來正常工作",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"小插件",subtext:"在商店中顯示小插件一欄",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"强制主題設定",subtext:"將强制所有主題使用自動生成的設定",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="下載數",i="全部",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"商店":"已安裝";switch(r){case"A-Z":t.style.order="";break;case"上次更新時間":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"下載數":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"商店"!==n&&n!==p||"全部"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"商店";"商店"!==n&&"已安裝"!==n&&(n="商店"),o.forEach(t);const a=""===d&&"商店"===n&&"全部"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"沒有結果"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="沒有結果",""!==d&&"商店"===n&&"全部"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="沒有結果,你想找的是個插件嗎?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="沒有結果,你想找的是個主題嗎?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"所有主題"!==c.textContent&&"所有插件"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["插件","主題"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"搜索插件":"搜索主題",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"排列方式",options:["下載數","A-Z","上次更新時間"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("全部"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"最高下載數",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最近更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"所有插件":"所有主題"},{type:"gm-footer"}]))),e.settings.createItem("小插件",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("更新日志",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 模組"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"插件"===e||"主題"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"主題":"插件",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 商店"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 商店"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="移除",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="安裝",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"插件"===e[1]||"主題"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"移除":"安裝",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 捐贈者","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻譯者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 開發者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 官方 Discord 伺服器","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="移除"===this.props.buttonText?"安裝":"移除",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"主題"===e[1]))[2],d=goosemod.settings.items.find((e=>"插件"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 模組")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"66d6ae547d282cb9ed792a7f36d00a1ed455e259",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"開啟連結"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"移除"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="已通過 PGP 驗證",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="未通過 PGP 驗證",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="無 PGP 驗證",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"源"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("源無效",{type:"error",timeout:5e3,subtext:"格式錯誤"});if(!confirm("GooseMod 的開發者將因爲沒有對此第三方源的控制權而無法保證模組的安全與質量。\n\n因可能會對您 Discord 客戶端造成不必要的安全風險,如果您不信任此源的擁有者,請不要添加此源。\n\n如您已知悉添加第三方源帶來的風險並執意要添加,請在下面點 OK。"))return void goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"確認取消"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("因爲此第三方源沒有 PGP 驗證,請在加入此源之前確認源開發者的可信度。\n\n如想徹底解決這個問題,請要求源開發者增加 PGP 支援。\n\n如您已知悉潛在的風險並執意要添加,請在下面點 OK。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"確認取消"}):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"PGP 認證錯誤"})}},"下載")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"商店"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"已安裝")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"刷新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"源",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file +(function(){"use strict";function styleInject(e,t){void 0===t&&(t={});var o=t.insertAt;if(e&&"undefined"!=typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===o&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}var css_248z='.gm-store-card{background-color:var(--background-secondary);border-radius:8px;box-shadow:var(--elevation-medium);box-sizing:border-box;height:380px;margin:10px;padding:12px;position:relative;width:330px}.gm-store-card>:first-child{-webkit-user-drag:none;background:linear-gradient(225deg,var(--background-tertiary),var(--background-secondary-alt));border-radius:8px 8px 0 0;height:200px;margin-left:-12px;margin-top:-12px;object-fit:contain;user-select:none;width:calc(100% + 24px)}.gm-store-card>:first-child[src="/assets/2366391afb15ed6c2a019a0c0caa0797.svg"]{object-fit:cover}.gm-store-card>:first-child:hover~:nth-child(2),.gm-store-card>:nth-child(2):hover{top:132px}.gm-store-card>:nth-child(2){background-color:rgba(0,0,0,.5);border-radius:16px;cursor:default;opacity:.95;padding-right:10px;position:absolute;right:10px;top:152px;transition:top .2s;width:fit-content}.gm-store-card>:nth-child(2).no-pfp{padding:0 8px}.gm-store-card>:nth-child(3){-webkit-line-clamp:1;margin-top:10px}.gm-store-card>:nth-child(3),.gm-store-card>:nth-child(4){-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;width:calc(100% - 34px)}.gm-store-card>:nth-child(4){-webkit-line-clamp:3;clear:both;margin-top:5px}.gm-store-card>:nth-child(5){align-items:center;display:flex;flex-direction:column;gap:10px;margin-left:auto;order:2;position:absolute;right:12px;top:214px;width:24px}.gm-store-card>:nth-child(5)>*{color:var(--interactive-normal)}.gm-store-card>:nth-child(5)>:hover{color:var(--interactive-hover)}.gm-store-card>:nth-child(6){bottom:12px;display:flex;gap:5px;position:absolute;width:calc(100% - 32px)}.gm-store-card>:nth-child(6)>:first-child{cursor:pointer;display:inline-flex;width:90px}.gm-store-card>:nth-child(6)>:nth-child(2){color:#ddd;cursor:pointer;display:inline-flex;margin-left:14px;min-width:0;padding:2px 5px;width:auto}.gm-store-card>:nth-child(6)>:nth-child(3){margin-top:4px;position:absolute;right:-10px}.gm-store-card>:nth-child(6)>:nth-child(3).hide-toggle{display:none!important}.gm-store-card .inner-2O5YO7{height:100%}.gm-store-card .outer-s4sY2_{height:100%;padding-top:0!important;transition:height .2s}.gm-store-card>:first-child:hover .pagination-20ouY7{bottom:0}.gm-store-card .pagination-20ouY7{bottom:-30px;height:30px;position:absolute;transition:bottom .2s cubic-bezier(0,.8,.5,1);width:100%;z-index:1}.gm-store-card .arrow-vOpU7R,.gm-store-card .dotNormal-9wUKKy{opacity:.6}#gm-settings-inject>div,.gm-store-settings{align-items:center;display:flex;flex-flow:row wrap;justify-content:center}.gm-store-settings>h1{flex-basis:100%}.gm-inline-dropdown{align-items:center;display:flex;margin-left:12px}.gm-inline-dropdown>.select-2TCrqx{margin-left:8px;width:120px}.gm-settings-note-markdown{color:inherit!important;font-size:inherit}.gm-settings-note-markdown .paragraph-3Ejjt0{margin:0}.gm-settings-label-icon{vertical-align:sub}.gm-settings-label-text{margin-left:6px;vertical-align:top}.gm-settings-header-collapser{float:right;height:22px;margin-top:-3px;width:22px}.gm-settings-header-collapser.collapsed{transform:rotate(-90deg)}.gm-store-category{width:100%}.gm-store-category>:nth-child(2){display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fill,350px);overflow-x:scroll;width:100%}.gm-store-header{margin-bottom:0;margin-left:10px;margin-top:20px;max-width:100%;width:100%}.gm-store-header>div{font-size:24px;font-weight:700;line-height:26px}.gm-store-search{flex-grow:1;margin-right:12px}.gm-highlight #app-mount:after{box-shadow:0 0 0 99999px rgb(0 0 0/50%);content:"";display:block;z-index:9}.gm-highlight .content-3YMskv [id*=gm]{background:var(--background-modifier-selected);border-radius:0;filter:brightness(2);transition:all .5s;z-index:10}.gm-ootb-modal{width:600px}.gm-modules-preview{align-items:center;display:flex;justify-content:center;margin-bottom:60px;text-align:start}.gm-modules-preview .guildIcon-2Ut8OT{display:none}.gm-modules-preview .cardHeader-r-Jvg2{margin-bottom:12px}.gm-modules-preview .card-B2gQB5{background-color:var(--background-tertiary)}.gm-store-author-pfp{border-radius:50%;display:inline;margin-right:5px;vertical-align:bottom}.gm-store-author-name{line-height:32px}.gm-carousel-modal{background-color:var(--background-primary);border-radius:6px;padding:12px;pointer-events:all}.gm-carousel-modal .outer-s4sY2_{background-color:var(--background-secondary-alt);height:30vw;padding-top:0!important;width:50vw}.gm-carousel-modal .root-3tU4d2{background-color:unset}.gm-carousel-modal .smallCarouselImage-2Qvg9S{cursor:default}.gm-store-loading-container{align-items:center;display:flex;height:100%;justify-content:center}.gm-store-card-mini{cursor:pointer;height:74px;width:100%}.gm-store-card-mini>:first-child{background-color:unset;border-radius:0 8px 8px 0;height:100%;position:absolute;right:0;width:120px}.gm-store-card-mini>:nth-child(3){margin-top:0}.gm-store-card-mini>:nth-child(4){-webkit-line-clamp:1;width:75%}.gm-store-card-mini>:nth-child(2),.gm-store-card-mini>:nth-child(5),.gm-store-card-mini>:nth-child(6){display:none}.gm-modules-container{display:flex;flex-flow:row wrap;grid-template-columns:none;justify-content:center}.gm-store-card-mini .pagination-20ouY7{display:none}.gm-store-card-mini .smallCarouselImage-2Qvg9S{cursor:unset}.gm-repos-modal-icon-Verified{color:var(--status-positive-background)}.gm-repos-modal-icon-Alert{color:var(--status-danger-background)}.gm-repos-modal-icon-Alert .icon-1ihkOt{height:12px;width:12px}.gm-repos-modal-icon-Help{color:var(--status-warning-background)}.gm-error-boundary{display:flex;flex-flow:column;height:100%;width:100%}.gm-error-boundary>:first-child{display:flex;justify-content:center;width:100%}.gm-error-boundary>:first-child>:first-child{background-image:url(https://goosemod.com/img/goose_glitch.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;display:block;height:48px;margin-right:22px;object-fit:cover;overflow:hidden;pointer-events:none;width:48px}.gm-error-boundary>:first-child>:nth-child(2){margin-top:-2px}.gm-error-boundary>:first-child>:nth-child(2) .title-3KTIjF{color:var(--interactive-normal);font-family:var(--font-primary);margin-bottom:0;margin-left:1px}.gm-error-boundary>:nth-child(2){display:flex;gap:40px;justify-content:center;margin-top:28px;width:100%}.gm-error-boundary>:nth-child(3){align-items:center;color:var(--header-secondary);display:flex;justify-content:flex-end;margin-top:28px}.gm-error-boundary>:nth-child(3)>:first-child{height:24px;margin-right:4px;width:24px}.gm-error-boundary>:nth-child(4){margin-top:8px;width:100%}.gm-error-boundary>:nth-child(4) pre{margin-bottom:28px}.layer-v9HyYc{z-index:999}.container-ZMc96U.themed-Hp1KC_{--background-primary:unset}.container-2cd8Mz{background:var(--background-primary)!important}#gm-sponsor-modal .headerTitle-kLIB73{background-image:url(https://goosemod.com/img/goose_gold.jpg);background-position:50%;background-repeat:no-repeat;background-size:contain;border-radius:50%;height:60px}#gm-sponsor-modal .headerTitle-kLIB73:after{color:var(--text-normal);content:"GooseMod Sponsor";display:block;font-family:var(--font-display);font-size:24px;margin-left:70px;margin-top:6px;width:140px}#gm-sponsor-modal .guildBackground-3BSNJY>svg:first-child{display:none}#gm-sponsor-modal .content-2eQb8J{padding:16px 8px 16px 16px}#gm-sponsor-modal .content-2eQb8J>div:not(:last-child){margin-bottom:32px}#gm-sponsor-modal .footer-31IekZ{left:-16px;top:16px;width:calc(100% - 8px)}#gm-sponsor-modal .content-2eQb8J>div:first-child{color:var(--text-normal);font-family:var(--font-primary);font-size:16px;line-height:20px}';styleInject(css_248z);var sleep=e=>new Promise((t=>setTimeout(t,e)));const fromStr=e=>e.replace("rgb(","").replace(")","").split(", "),toStr=([e,t,o])=>`rgb(${e}, ${t}, ${o})`,light=(e,t)=>toStr(fromStr(e).map((e=>e*t))),gmColor="88, 101, 242",regionColor="114, 137, 218",makeRegionStyle=e=>`background-color: rgb(${e}); color: white; border-radius: 4px; border: 2px solid ${light(e,.5)}; padding: 3px 6px 3px 6px; font-weight: bold;`,debug=(e,...t)=>{const o=e.split("."),s=o.map((e=>`%c${e}%c`)),n=o.reduce((e=>e.concat(makeRegionStyle(regionColor),"")),[]);console.log(`%cGooseMod%c ${s.join(" ")}`,makeRegionStyle(gmColor),"",...n,...t)};var Logger={__proto__:null,debug:debug};let wpRequire;window.webpackChunkdiscord_app.push([[Math.random()],{},e=>{wpRequire=e}]);const all=()=>Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).filter((e=>e)),wrapFilter=e=>t=>{try{return e(t)}catch{return!1}},find=(e,t=!0)=>{const o=wrapFilter(e);for(const e of all()){if(t&&e.default&&o(e.default))return e.default;if(o(e))return e}},findAll=(e,t=!0)=>{const o=wrapFilter(e),s=[];for(const e of all())t&&e.default&&o(e.default)&&s.push(e.default),o(e)&&s.push(e);return s},findByProps=(...e)=>find((t=>e.every((e=>void 0!==t[e])))),findByPropsAll=(...e)=>findAll((t=>e.every((e=>void 0!==t[e])))),findByPrototypes=(...e)=>find((t=>t.prototype&&e.every((e=>void 0!==t.prototype[e])))),findByDisplayName=e=>{const t=find((t=>t.displayName===e));return t||"Text"!==e?"Header"===e?find((e=>"LegacyHeader"===e.displayName)):t:find((e=>"LegacyText"===e.displayName))},findByDisplayNameAll=e=>findAll((t=>t.displayName===e)),findByModuleId=e=>wpRequire.c[e],common={React:findByProps("createElement"),ReactDOM:findByProps("render","hydrate"),Flux:findByProps("Store","connectStores"),FluxDispatcher:findByProps("register","wait"),i18n:findByProps("Messages","_requestedLocale"),channels:findByProps("getChannelId","getVoiceChannelId"),constants:findByProps("API_HOST")};var WebpackModules={__proto__:null,all:all,find:find,findAll:findAll,findByProps:findByProps,findByPropsAll:findByPropsAll,findByPrototypes:findByPrototypes,findByDisplayName:findByDisplayName,findByDisplayNameAll:findByDisplayNameAll,findByModuleId:findByModuleId,common:common},_GMErrorBoundary=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("DropdownArrow");return class extends e.PureComponent{constructor(e){super(e),this.state={error:!1}}componentDidCatch(e,t){console.log("honk",{error:e,moreInfo:t});const o=decodeURI(e.stack.split("\n").filter((e=>!e.includes("/assets/"))).join("\n")),s=decodeURI(t.componentStack.split("\n").slice(1,9).join("\n")),n=o.match(/\((.*) \| GM Module:/)?.[1]||s.match(/\((.*) \| GM Module:/)?.[1];let a=n||"Unknown";const r=n?"Plugin":"Cause";"Unknown"===a&&(o.includes("GooseMod")&&(a="GooseMod Internals"),(o.toLowerCase().includes("powercord")||o.toLowerCase().includes("betterdiscord"))&&(a="Other Mods")),this.setState({error:!0,suspectedCause:{name:a,type:r},errorStack:{raw:e.stack,useful:o},componentStack:{raw:t.componentStack,useful:s}})}render(){return this.state.toRetry&&(this.state.error=!1),setTimeout((()=>{this.state.toRetry=!0}),100),this.state.error?e.createElement("div",{className:"gm-error-boundary"},e.createElement("div",{},e.createElement("div",{}),e.createElement(t,{tag:"h1"},"GooseMod has handled an error",e.createElement(s,{},`## Suspected ${this.state.suspectedCause.type}: ${this.state.suspectedCause.name}`))),e.createElement("div",{},e.createElement(o,{color:o.Colors.BRAND,size:o.Sizes.LARGE,onClick:()=>{this.state.toRetry=!0,this.forceUpdate()}},"Retry"),e.createElement(o,{color:o.Colors.RED,size:o.Sizes.LARGE,onClick:()=>{location.reload()}},"Refresh")),e.createElement("div",{onClick:()=>{this.state.toRetry=!1,this.state.showDetails=!this.state.showDetails,this.forceUpdate()}},e.createElement("div",{style:{transform:`rotate(${this.state.showDetails?"0":"-90"}deg)`}},e.createElement(n,{width:24,height:24})),this.state.showDetails?"Hide Details":"Show Details"),this.state.showDetails?e.createElement("div",{},e.createElement(s,{},"# Error Stack"),e.createElement(s,{},`\`\`\`\n${this.state.errorStack.useful}\n\`\`\``),e.createElement(s,{},"# Component Stack"),e.createElement(s,{},`\`\`\`\n${this.state.componentStack.useful}\n\`\`\``),e.createElement(s,{},"# Debug Info"),e.createElement(s,{},`\`\`\`\n${goosemod.genDebugInfo()}\n\`\`\``)):null):this.props.children}}};let GMErrorBoundary;const generateIdSegment=()=>Math.random().toString(16).substring(2),generateId=(e=3)=>new Array(e).fill(0).map((()=>generateIdSegment())).join(""),modIndex={},isReactComponent=e=>!(!e||!e.prototype?.render&&!e.displayName),beforePatches=(e,t,o,s,n)=>{const a=modIndex[o][n].before;if(0===a.length)return t;let r=t;for(const t of a)try{let o=t.call(e,r);if(!1===o)return!1;Array.isArray(o)&&(r=o)}catch(e){console.error(`Before patch (${o} - ${s}) failed, skipping`,e)}return r},insteadPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].instead;if(0===r.length)return o.apply(e,t);let i;for(const a of r)try{let s=a.call(e,t,o.bind(e));void 0!==s&&(i=s)}catch(e){console.error(`Instead patch (${s} - ${n}) failed, skipping`,e)}return i},afterPatches=(e,t,o,s,n,a)=>{const r=modIndex[s][a].after;let i=o;for(const o of r)try{let s=o.call(e,t,i);void 0!==s&&(i=s)}catch(e){console.error(`After patch (${s} - ${n}) failed, skipping`,e)}return i},generateNewFunction=(e,t,o,s)=>function(...n){const a=beforePatches(this,n,t,o,s);let r;if(Array.isArray(a)){const i=insteadPatches(this,n,e,t,o,s);r=afterPatches(this,a,i,t,o,s)}if(modIndex[t][s].harden){GMErrorBoundary||(GMErrorBoundary=_GMErrorBoundary());const{React:e}=goosemod.webpackModules.common;return e.createElement(GMErrorBoundary,{},r)}return r},patch$a=(e,t,o,s=!1,n=!1)=>{if("function"!=typeof e[t])return goosemod.logger.debug("patcher","Failed to patch as key isn't func",e,t),()=>{};if(!e._goosemodPatcherId){const t=generateId();e._goosemodPatcherId=t,modIndex[t]={}}const a=e._goosemodPatcherId,r=`gm-${t}`;if(!modIndex[a][r]){const o=e[t];e[t]=Object.assign(generateNewFunction(o,a,t,r),o),e[t].toString=()=>o.toString();let s=!1;isReactComponent(o)&&(s=!0),e.render&&("render"!==t?patch$a(e,"render",(()=>{})):s=!0),o.displayName?.endsWith("Item")&&(s=!1),modIndex[a][r]={before:[],after:[],instead:[],harden:s,original:o}}const i=n?"instead":s?"before":"after",d=modIndex[a][r][i].push(o);return()=>{modIndex[a][r][i].splice(d-1,1);["before","after","instead"].every((e=>0===modIndex[a][r][e].length))&&(e[t]=modIndex[a][r].original,delete e._goosemodPatcherId)}},uninjectors$1={},inject=(e,t,o,s,n=!1)=>{uninjectors$1[e]=patch$a(t,o,s,n)},uninject=e=>!!uninjectors$1[e]&&(uninjectors$1[e](),!0);var simpleTooltip=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("tooltipBottom","tooltipRight");return class extends e.PureComponent{constructor(e){super(e),this.props.position=this.props.position.toLowerCase(),this.state={}}render(){return this.props.children({onMouseEnter:async()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove();let e=document.createElement("div");document.querySelectorAll(".layerContainer-2v_Sit")[1].appendChild(e);const o=document.querySelector(`.gm-tooltipref-${this.state.refId}`).getBoundingClientRect();e.outerHTML=`
${this.props.text}
`,e=document.querySelector(".gm-tooltip");const s=e.getBoundingClientRect();switch(this.props.position){case"top":e.style.left=o.left+o.width/2-s.width/2+"px",e.style.top=o.top-s.height-8+"px";break;case"left":e.style.left=o.left-s.width-8+"px",e.style.top=o.top+o.height/2-s.height/2+"px"}},onMouseLeave:()=>{document.querySelector(".gm-tooltip")&&document.querySelector(".gm-tooltip").remove()},text:this.props.text,className:`gm-tooltipref-${this.state.refId=Math.random().toString().split(".")[1]}`})}}};const getReactInstance=e=>e&&e[Object.keys(e).find((e=>e.startsWith("__reactInternalInstance")||e.startsWith("__reactFiber$")))],getNodeInternals=e=>e&&e._reactInternalFiber||e._reactInternals,getOwnerInstance=e=>{let t=getReactInstance(e);for(;t.return;)if(t=t.return,t.stateNode?._reactInternals)return t.stateNode},findInTree=(e,t,o)=>{const{walkable:s=null,ignore:n=[]}=o??{};return e&&"object"==typeof e?"string"==typeof t?e[t]:t(e)?e:Array.isArray(e)?e.map((e=>findInTree(e,t,o))).find((e=>e)):(s||Object.keys(e)).map((s=>!n.includes(s)&&findInTree(e[s],t,o))).find((e=>e)):null},findInReactTree=(e,t)=>findInTree(e,t,{walkable:["props","children","child","sibling"]});var ReactUtils={__proto__:null,getReactInstance:getReactInstance,getNodeInternals:getNodeInternals,getOwnerInstance:getOwnerInstance,findInTree:findInTree,findInReactTree:findInReactTree};let goosemodScope$j={};const setThisScope$m=e=>{goosemodScope$j=e},labelToId=e=>e.toLowerCase().replace(/ /g,"-"),getInjectId=e=>`gm-cm-${e}`,patchTypeToNavId=e=>{switch(e){case"user":return"user-context";case"message":return"message";default:return e}},getExtraInfo=e=>{try{switch(e){case"message":return getNodeInternals(getOwnerInstance(document.getElementById("message"))).return.return.memoizedProps;case"message-actions":return getNodeInternals(getOwnerInstance(document.getElementById("message-actions"))).return.return.memoizedProps;case"user-context":return getNodeInternals(getOwnerInstance(document.getElementById("user-context"))).return.return.return.return.return.return.memoizedProps;default:return}}catch(e){return}},generateElement=(e,t,o,s,n,{Menu:a,React:r})=>{const i=void 0!==e.checked;e.id=e.id||labelToId(e.label);let d=t;"function"==typeof d&&(d=d()),d&&(d=d.map((e=>(e.originalAction||(e.originalAction=e.action),e)))),e.action=function(){return i?(e.checked=!e.checked,c.props.checked=e.checked,getOwnerInstance(document.querySelector(`[id^="${o}-"][id*="${e.id}"]`)).props.onMouseEnter(),e.originalAction(arguments,n,e.checked)):e.originalAction(arguments,n)};const l=i?a.MenuCheckboxItem:a.MenuItem,c=void 0!==d?r.createElement(l,e,...d.map((e=>generateElement(e,e.sub,o,s,n,{Menu:a,React:r})))):r.createElement(l,e);return c},patch$9=(e,t)=>{const{React:o}=goosemodScope$j.webpackModules.common,s=goosemodScope$j.webpackModules.findByProps("MenuItem"),n=patchTypeToNavId(e);return t.originalAction=t.action,patch$a(s,"default",(a=>{if(a.length<1)return;const[{navId:r,children:i}]=a;if(r!==n&&("message"!==n||"message-actions"!==r))return a;if(findInReactTree(i,(e=>e?.props?.id===(t.id||labelToId(t.label)))))return a;const d=Object.assign({},t),l=generateElement(d,d.sub,n,e,Object.assign({},getExtraInfo(r)),{Menu:s,React:o});let c=findInReactTree(i,(e=>e&&e.props&&!0===e.props.goosemod));return c?(Array.isArray(c.props.children)||(c.props.children=[c.props.children]),c.props.children.push(l)):(c=o.createElement(s.MenuGroup,{goosemod:!0},l),i.push([o.createElement(s.MenuSeparator),c])),a}),!0)},uninjectors={},add$1=(e,t)=>{uninjectors[getInjectId(t.id||labelToId(t.label))]=patch$9(e,t)},remove$3=e=>{const t=getInjectId(labelToId(e));return!!uninjectors[t]&&(uninjectors[t](),!0)};var _contextMenu={__proto__:null,setThisScope:setThisScope$m,labelToId:labelToId,getInjectId:getInjectId,patchTypeToNavId:patchTypeToNavId,getExtraInfo:getExtraInfo,patch:patch$9,add:add$1,remove:remove$3};let goosemodScope$i={};const setThisScope$l=e=>{goosemodScope$i=e},patch$8=(e,t,o)=>{const{React:s}=goosemodScope$i.webpackModules.common,n=goosemodScope$i.webpackModules.findByDisplayName("Tooltip"),{icon:a}=goosemodScope$i.webpackModules.findByProps("icon","isHeader"),r=goosemodScope$i.webpackModules.find((e=>e.default&&"MiniPopover"===e.default.displayName));return patch$a(r,"default",((i,d)=>{const l=findInReactTree(d,(e=>e&&e.message));return l?(d.props.children.unshift(s.createElement(n,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:n})=>s.createElement(r.Button,{onClick:()=>{o(l)},onMouseEnter:n,onMouseLeave:e},"string"!=typeof t?t:s.createElement("img",{src:t,width:"24px",height:"24px",className:a}))))),d):d}))};var _miniPopover={__proto__:null,setThisScope:setThisScope$l,patch:patch$8};let goosemodScope$h={};const setThisScope$k=e=>{goosemodScope$h=e},patch$7=(e,t,o,{inUpload:s=!1,inReadonlyChannels:n=!1}={})=>{const{React:a}=goosemodScope$h.webpackModules.common,r=goosemodScope$h.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$h.webpackModules.findByProps("Looks","DropdownSizes"),d=goosemodScope$h.webpackModules.findByProps("button"),l=goosemodScope$h.webpackModules.findByProps("buttonWrapper","pulseButton"),c=goosemodScope$h.webpackModules.findByProps("button","textArea"),m=goosemodScope$h.webpackModules.find((e=>e.type&&e.type.render&&"ChannelTextAreaContainer"===e.type.render.displayName));return patch$a(m.type,"render",((m,p)=>{const g=findInReactTree(p,(e=>e&&e.className&&0===e.className.indexOf("buttons-")));return!g||!s&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaUpload-3t7EIx")||!n&&!0===p.props.children[0].ref.current?.classList?.contains("channelTextAreaDisabled-8rmlrp")||g.children.unshift(a.createElement("div",null,a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:s})=>a.createElement(i,{look:i.Looks.BLANK,size:i.Sizes.ICON,onClick:()=>{o(g)},onMouseEnter:s,onMouseLeave:e},"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${c.button} ${d.contents} ${l.button}`})))))),p}))};var _channelTextAreaButtons={__proto__:null,setThisScope:setThisScope$k,patch:patch$7};let goosemodScope$g={},Commands;const setThisScope$j=e=>{goosemodScope$g=e,Commands=goosemodScope$g.webpackModules.findByProps("BUILT_IN_COMMANDS","BUILT_IN_SECTIONS");const{React:t}=goosemodScope$g.webpackModules.common,o=goosemod.webpackModules.findByProps("getIconComponent"),s=goosemod.webpackModules.find((e=>"ApplicationCommandItem"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("useSearchManager"),a={id:applicationId,type:0,name:"GooseMod"};goosemod.patcher.patch(o,"getIconComponent",(([e])=>{if(e.id===applicationId)return e=>t.createElement("div",{className:"wrapper-1wwiGV selectable-fgiA2c",style:{width:e.width,height:e.height,padding:e.padding??0}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:e.width,height:e.height,borderRadius:"50%"},className:"icon-1kx1ir"}))})),goosemod.patcher.patch(s,"default",(([{command:e}],o)=>(e.applicationId===applicationId&&(o.props.children[0]=t.createElement("div",{className:"wrapper-3t15Cn image-1a_IXB",style:{width:32,height:32}},t.createElement("img",{src:"https://goosemod.com/img/logo.jpg",style:{width:32,height:32,borderRadius:"50%"},className:"icon-1kx1ir"}))),o))),goosemod.patcher.patch(n,"useSearchManager",((e,t)=>{const o=Object.values(Commands.BUILT_IN_COMMANDS).filter((e=>e.applicationId===applicationId));if(0===o.length)return t;t.activeSections.find((e=>e.id===a.id))||t.activeSections.push(a),t.sectionDescriptors.find((e=>e.id===a.id))||t.sectionDescriptors.push(a);let s=t.commandsByActiveSection.find((e=>e.section.id===a.id));if(s?s.data=o:null!=t.filteredSectionId&&t.filteredSectionId!==applicationId||t.commandsByActiveSection.push({section:a,data:o}),t.commandsByActiveSection.find((e=>"-1"===e.section.id))){const e=t.commandsByActiveSection.find((e=>"-1"===e.section.id));e.data=e.data.filter((e=>e.applicationId!==applicationId))}return t}))},applicationId="-3",add=(e,t,o,s=[])=>{const n=Commands;for(const e of s)e.displayName=e.displayName??e.name;n.BUILT_IN_COMMANDS.push({applicationId:applicationId,type:1,inputType:0,description:t,name:e,displayName:e,displayDescription:t,execute:o,options:s,id:`-${Math.random().toString().split(".")[1].substring(0,5)}`})},remove$2=e=>{const t=Commands;t.BUILT_IN_COMMANDS=t.BUILT_IN_COMMANDS.filter((t=>t.name!==e))};var _commands={__proto__:null,setThisScope:setThisScope$j,add:add,remove:remove$2};let goosemodScope$f={};const setThisScope$i=e=>{goosemodScope$f=e;const{BOT_AVATARS:t}=goosemodScope$f.webpackModules.findByProps("BOT_AVATARS","DEFAULT_AVATARS");t.GooseMod="https://cdn.discordapp.com/avatars/760559484342501406/5125aff2f446ad7c45cf2dfd6abf92ed.webp"},send=(e,t="GooseMod")=>{const{createBotMessage:o}=goosemodScope$f.webpackModules.findByProps("createBotMessage"),{getChannelId:s}=goosemodScope$f.webpackModules.findByProps("getChannelId","getVoiceChannelId"),{receiveMessage:n}=goosemodScope$f.webpackModules.findByProps("receiveMessage","sendBotMessage"),a=o(s(),"");"string"==typeof e?a.content=e:a.embeds.push(e),a.state="SENT",a.author.id="1",a.author.bot=!0,a.author.discriminator="0000",a.author.avatar="GooseMod",a.author.username=t,n(s(),a)};let notices$1=[],goosemodScope$e={},updateCall;const setThisScope$h=async e=>{goosemodScope$e=e;const t=goosemodScope$e.webpackModules.findByProps("base","sidebar");for(;void 0===document.getElementsByClassName(t.base)[0];)await sleep(10);const o=getOwnerInstance(document.getElementsByClassName(t.base)[0]),{React:s}=goosemodScope$e.webpackModules.common;class n extends s.PureComponent{constructor(e){super(e),this._updateCall=()=>this.forceUpdate()}componentDidMount(){updateCall=this._updateCall}componentWillUnmount(){}render(){return notices$1.length>0?notices$1.shift().react:null}}patch$a(o.props.children[0],"type",((e,o)=>(goosemod.reactUtils.findInReactTree(o,(e=>e.className===t.base)).children.unshift(s.createElement(n)),o))),o.forceUpdate()},patch$6=(e,t,o,s="brand")=>{const n=goosemodScope$e.webpackModules.findByProps("colorDanger","notice")[`color${s[0].toUpperCase()+s.substring(1).toLowerCase()}`],a=goosemodScope$e.webpackModules.findByProps("NoticeCloseButton","NoticeButton"),{React:r}=goosemodScope$e.webpackModules.common,i=generateId(),d=r.createElement(a.default,{class:"goosemod-notice",id:i,color:n},r.createElement(a.NoticeCloseButton,{onClick:()=>{notices$1=notices$1.filter((e=>e.id!==i)),updateCall()}}),e,r.createElement(a.NoticeButton,{onClick:()=>{o()}},t));notices$1.push({react:d,id:i}),updateCall()};var _notices={__proto__:null,get notices(){return notices$1},setThisScope:setThisScope$h,patch:patch$6};let goosemodScope$d={};const setThisScope$g=e=>{goosemodScope$d=e},patch$5=(e,t,o,{atEnd:s=!1,showWhere:n=["dm","channel"]}={})=>{const{React:a}=goosemodScope$d.webpackModules.common,r=goosemod.webpackModules.findByProps("title","themed","icon","icon","iconBadge"),i=goosemodScope$d.webpackModules.find((e=>e.default&&"HeaderBar"===e.default.displayName));return patch$a(i,"default",((d,l)=>{const c=l.props.children.props.children[1].props.children.props.children;let m="other";if(null===c[1])m="home";else switch(c[0][1].key){case"mute":m="channel";break;case"calls":m="dm"}return n.includes(m)?(c[s?"push":"unshift"](a.createElement(i.Icon,{"aria-label":e,tooltip:e,disabled:!1,showBadge:!1,selected:!1,icon:()=>"string"!=typeof t?t:a.createElement("img",{src:t,width:"24px",height:"24px",className:`${r}.icon`}),onClick:()=>{o()}})),l):l}))};var _headerBarButtons={__proto__:null,setThisScope:setThisScope$g,patch:patch$5};let goosemodScope$c={};const setThisScope$f=e=>{goosemodScope$c=e},patch$4=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$c.webpackModules.common,r=goosemodScope$c.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$c.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$c.webpackModules.findByProps("profileBadge24","profileBadge22"),l=[];for(const c of goosemodScope$c.webpackModules.findByPropsAll("BadgeSizes"))l.push(patch$a(c,"default",(([{user:l,size:c}],m)=>{if(!o().includes(l.id))return m;let p=d.profileBadge24;switch(c){case 1:p=d.profileBadge22;break;case 2:p=d.profileBadge18}return m.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":""},className:`${d.profileBadge} ${p}`}))))),m})));return()=>l.forEach((e=>e()))};var _userBadges={__proto__:null,setThisScope:setThisScope$f,patch:patch$4};const setThisScope$e=e=>{},patch$3=(e,{before:t=!1}={})=>{const o=goosemod.webpackModules.find((e=>e.default&&"function"==typeof e.default&&e.default.toString().includes("e.hideTag"))),{React:s}=goosemod.webpackModules.common;return patch$a(o,"default",(([o],n)=>{const a=e(o);if(!a||""===a.props.children)return;const r=s.createElement("span",{style:{width:"5px",display:"inline-block"}});return delete a.props.style.marginLeft,delete a.props.style.marginRight,t?n.props.children.unshift(a,r):n.props.children.push(r,a),n}))};var _username={__proto__:null,setThisScope:setThisScope$e,patch:patch$3};let goosemodScope$b={};const setThisScope$d=e=>{goosemodScope$b=e},patch$2=(e,t,o,s=(()=>{}),{round:n=!1}={})=>{const{React:a}=goosemodScope$b.webpackModules.common,r=goosemodScope$b.webpackModules.findByDisplayName("Tooltip"),i=goosemodScope$b.webpackModules.findByDisplayName("Clickable"),d=goosemodScope$b.webpackModules.findByProps("guildIconContainer","iconTierNone"),l=goosemod.webpackModules.findByProps("AnimatedBanner");return patch$a(l.default,"type",(function(l,c){if(!o().includes(l[0]?.guild?.id))return c;const m=c.props.children[0].props.children[0];m.__injected||(patch$a(m,"type",(function(o,l){return l.props.children.unshift(a.createElement(r,{position:"top",text:e},(({onMouseLeave:e,onMouseEnter:o})=>a.createElement(i,{onClick:()=>{s()},onMouseEnter:o,onMouseLeave:e},a.createElement("div",{style:{backgroundImage:`url("${t}")`,borderRadius:n?"50%":"",width:"16px",height:"16px",backgroundRepeat:"no-repeat",backgroundSize:"contain",backgroundPosition:"50%",objectFit:"cover"},className:`${d.guildIconContainer}`}))))),l})),m.__injected=!0)}))};var _guildBadges={__proto__:null,setThisScope:setThisScope$d,patch:patch$2};const contextMenu=_contextMenu,miniPopover=_miniPopover,channelTextAreaButtons=_channelTextAreaButtons,commands=_commands,internalMessage=send,notices=_notices,headerBarButtons=_headerBarButtons,userBadges=_userBadges,username=_username,guildBadges=_guildBadges,setThisScope$c=e=>{for(const t of[setThisScope$m,setThisScope$l,setThisScope$k,setThisScope$j,setThisScope$i,setThisScope$h,setThisScope$g,setThisScope$f,setThisScope$e,setThisScope$d])try{t(e)}catch(e){console.error("[GooseMod] Failed to scope patcher module",e,t)}};var Patcher={__proto__:null,contextMenu:contextMenu,miniPopover:miniPopover,channelTextAreaButtons:channelTextAreaButtons,commands:commands,internalMessage:internalMessage,notices:notices,headerBarButtons:headerBarButtons,userBadges:userBadges,username:username,guildBadges:guildBadges,setThisScope:setThisScope$c,patch:patch$a,inject:inject,uninject:uninject,simpleTooltip:simpleTooltip};let goosemodScope$a={};const setThisScope$b=e=>{goosemodScope$a=e},patch$1=()=>{const{React:e}=goosemodScope$a.webpackModules.common,t=goosemodScope$a.webpackModules.findByProps("Sizes","AnimatedAvatar");goosemodScope$a.patcher.patch(t,"default",(([{src:e}],t)=>{if(e.includes("/avatars"))return t.props["data-user-id"]=e.match(/\/avatars\/([0-9]+)\//)[1],t})),goosemodScope$a.patcher.patch(t.AnimatedAvatar,"type",((o,s)=>e.createElement(t.default,{...s.props})))};var _avatar={__proto__:null,setThisScope:setThisScope$b,patch:patch$1};const avatar=_avatar,setThisScope$a=e=>{setThisScope$b(e)},patch=()=>{patch$1()};var Attrs={__proto__:null,avatar:avatar,setThisScope:setThisScope$a,patch:patch};const toastCSS=".gm-toasts {\n position: fixed;\n display: flex;\n top: 0;\n flex-direction: column;\n align-items: center;\n justify-content: flex-end;\n pointer-events: none;\n z-index: 4000;\n\n bottom: 80px;\n right: 40px;\n}\n\n@keyframes gm-toast-up {\n from {\n transform: translateY(0);\n opacity: 0;\n }\n}\n\n.gm-toast {\n animation: gm-toast-up 300ms ease;\n background: rgba(79,84,92,0.5);\n backdrop-filter: blur(2px);\n padding: 22px;\n border-radius: 6px;\n box-shadow: var(--elevation-high);\n font-weight: 500;\n color: #fff;\n user-select: text;\n font-size: 20px;\n opacity: 1;\n margin-top: 40px;\n pointer-events: none;\n user-select: none;\n\n width: 280px;\n text-align: left;\n\n overflow-wrap: break-word;\n}\n\n.gm-toast > :first-child {\n margin-bottom: 12px;\n}\n\n.gm-toast > :last-child {\n color: var(--header-secondary);\n font-size: 18px;\n white-space: pre-line;\n}\n\n@keyframes gm-toast-down {\n to {\n transform: translateY(0px);\n opacity: 0;\n }\n}\n\n.gm-toast.closing {\n animation: gm-toast-down 200ms ease;\n animation-fill-mode: forwards;\n opacity: 1;\n transform: translateY(-10px);\n}\n\n\n.gm-toast.toast-info {\n background-color: hsla(197,calc(var(--saturation-factor, 1)*100%),47.8%, 0.5);\n}\n\n.gm-toast.toast-success {\n background-color: hsla(139,calc(var(--saturation-factor, 1)*66.8%),58.6%, 0.5);\n}\n\n.gm-toast.toast-danger,\n.gm-toast.toast-error {\n background-color: hsla(359,calc(var(--saturation-factor, 1)*82.6%),59.4%, 0.5);\n}\n\n.gm-toast.toast-warning,\n.gm-toast.toast-warn {\n background-color: hsla(38,calc(var(--saturation-factor, 1)*95.7%),54.1%, 0.5);\n}",styleSheet=document.createElement("style");styleSheet.textContent=toastCSS,document.head.appendChild(styleSheet);var showToast=(e,t={})=>{if(t?.type?.startsWith("debug")){if(!goosemod.settings.gmSettings.debugToasts)return;t.type=t.type.replace("debug","")}if(!document.querySelector(".gm-toasts")){const e=document.createElement("div");e.classList.add("gm-toasts"),document.querySelector("#app-mount").appendChild(e)}let{subtext:o="",type:s="",timeout:n=3e3}=t;n*=1.5;const a=document.createElement("div");a.classList.add("gm-toast"),s&&a.classList.add("toast-"+s);const r=document.createElement("div");r.textContent=e,a.appendChild(r);const i=document.createElement("div");i.textContent=o,a.appendChild(i),document.querySelector(".gm-toasts").appendChild(a);const d=()=>{a.classList.add("closing"),setTimeout((()=>{a.remove(),document.querySelectorAll(".gm-toasts .gm-toast").length||document.querySelector(".gm-toasts").remove()}),300)};return setTimeout(d,n),{toastElem:a,closeFn:d}};let goosemodScope$9={};const setThisScope$9=e=>{goosemodScope$9=e},show$1=(e,t,o,s,n)=>new Promise((a=>{const{React:r}=goosemodScope$9.webpackModules.common,{find:i,findByDisplayName:d,findByProps:l}=goosemodScope$9.webpackModules,c=d("Text"),m=i((e=>"Markdown"===e.displayName&&e.rules)),p=l("button","colorRed");(0,l("openModal","updateModal").openModal)((i=>(3===i.transitionState&&a(!1),r.createElement(d("ConfirmModal"),{header:t,confirmText:e,cancelText:s||goosemod.webpackModules.findByPropsAll("Messages")[1].Messages.CANCEL,confirmButtonColor:p[`color${n?n[0].toUpperCase()+n.substring(1).toLowerCase():"Red"}`],onClose:()=>{a(!1)},onCancel:()=>{a(!1),i.onClose()},onConfirm:()=>{a(!0),i.onClose()},transitionState:i.transitionState},...o.split("\n").map((e=>r.createElement(m,{size:c.Sizes.SIZE_16},e)))))))}));let goosemodScope$8={},showHideMod={},originalChangelog={};const setThisScope$8=e=>{goosemodScope$8=e,showHideMod=goosemodScope$8.webpackModules.findByProps("showChangeLog");const t=goosemodScope$8.webpackModules.findByProps("changeLog").changeLog;originalChangelog=Object.assign({},t)},showChangelog=()=>{showHideMod.showChangeLog()},hideChangelog=()=>{showHideMod.hideChangeLog()},resetChangelog=()=>{setChangelog(originalChangelog)},setChangelog=e=>{const t=goosemodScope$8.webpackModules.findByProps("changeLog"),o={template:"standard",revision:1,locale:"en-us",...e};for(const e of Object.keys(t.changeLog))delete t.changeLog[e];for(const e of Object.keys(o))t.changeLog[e]=o[e]};var Changelog={__proto__:null,setThisScope:setThisScope$8,showChangelog:showChangelog,hideChangelog:hideChangelog,resetChangelog:resetChangelog,setChangelog:setChangelog};const image="https://media.discordapp.net/attachments/756146058924392542/771374562184658944/2018-11-14-11-36-30-1200x800.png";let version,generated,goosemodScope$7={};const setThisScope$7=e=>{goosemodScope$7=e},show=async()=>{generated||generate(),goosemodScope$7.changelog.resetChangelog(),goosemodScope$7.changelog.setChangelog(generated),goosemodScope$7.changelog.showChangelog(),await sleep(300);const e=()=>{document.querySelector(".modal-3Hrb0S .size20-9iTTnl").textContent=`GooseMod ${version}`,document.querySelector(".modal-3Hrb0S .footer-31IekZ").remove()};e(),goosemodScope$7.changelog.resetChangelog(),setTimeout(e,300)},generate=()=>{const e=JSON.parse("{\"version\":\"v12.3\",\"date\":\"2021-11-03\",\"body\":\"New Store Badges {added marginTop}\\n======================\\n\\n* **Store UI now uses a badge system to show version, time since last update, and GitHub stars.**\\n\\nGeneral Hotfixes {progress}\\n======================\\n\\n* **Fixed InternalMessage / some commands.**\\n* **Fixed Store using incorrect scrollbars.**\\n* **Fixed Store not working / rendering.**\\n\\nAdditions to APIs {added}\\n======================\\n\\n* **Webpack: Added findByModuleId function.**\\n* **Settings, Header: Added hide prop.**\"}");version=e.version,generated={image:image,date:e.date,body:e.body}};var GoosemodChangelog={__proto__:null,setThisScope:setThisScope$7,show:show,generate:generate};let enabled=!1,todo=["themes","plugins"];const done=e=>{todo.splice(todo.indexOf(e),1)},themes=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"主題",confirmText:"瀏覽主題",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"安裝主題來美化你的Discord客戶端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"從上百種主題中自定義您的客戶端界面"))})},plugins=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text"),n=goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),a=Math.floor(Math.random()*(n.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"插件",confirmText:"瀏覽插件",onConfirm:async()=>{0===goosemod.ootb.todo.length&&(await sleep(2e3),goosemod.ootb.settings())},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:n.slice(a,a+3)}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"隨心所欲的自定義您的Discord客戶端"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"插件可徹底改進您的用戶體驗"))})},store=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByProps("transitionTo"),s=goosemod.webpackModules.findByDisplayName("Header"),n=goosemod.webpackModules.findByDisplayName("Text"),a=goosemod.moduleStoreAPI.modules.filter((e=>e.images&&e.images[0])).sort(((e,t)=>t.github?.stars-e.github?.stars)),r=Math.floor(Math.random()*(a.length-5));goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"商店",confirmText:"跳轉至商店頁面",onConfirm:async()=>{o.transitionTo("/channels/@me"),await sleep(100),document.body.classList.add("gm-highlight"),await sleep(3e3),document.body.classList.remove("gm-highlight")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:a.slice(r,r+3)}),t.createElement(s,{className:"header-2MiVco",size:s.Sizes.SIZE_24},"在商店裏瀏覽各式各樣的主題與插件"),t.createElement(n,{className:"byline-3REiHf",size:n.Sizes.SIZE_16,color:n.Colors.HEADER_SECONDARY},"GooseMod有自己的商店,為瀏覽與安裝模組提供了便利"))})},settings=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"設定",confirmText:"查看GooseMod設定",onConfirm:async()=>{goosemod.settings.openSettings(),await sleep(20),document.querySelector('[aria-controls="gm-設定-tab"]').click();const e=document.querySelector(".sidebarRegionScroller-3MXcoP");for(e.scrollTop=e.offsetHeight-270;document.querySelector(".closeButton-1tv5uR");)await sleep(100);goosemod.ootb.community()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"實驗功能",description:"來試用新鮮出爐的實驗功能"},{name:"實用的工具",description:"隨時創造備份,重灌GooseMod等"},{name:"模組支持",description:"隨心所欲的自定義GooseMod"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"使用GooseMod來自定義各種功能"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"琳琅滿目的選項"))})},community=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"社群",confirmText:"加入GooseMod的官方Discord伺服器",onConfirm:()=>{window.open("https://goosemod.com/discord")},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"詢問問題",description:"詢問任何問題並得到解答"},{name:"新聞",description:"第一時間得到GooseMod官方發佈的最新消息"},{name:"參與進社區",description:"幫助其他人回答疑難雜症"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"加入GooseMod的社區"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"加入我們的Discord伺服器"))})},start=async()=>{const e=(await Promise.resolve().then((function(){return modulesPreview$1}))).default(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("Header"),s=goosemod.webpackModules.findByDisplayName("Text");goosemod.webpackModules.find((e=>e.show&&e.show.toString().includes("confirmText"))).show({className:"gm-ootb-modal",title:"GooseMod",confirmText:"瞭解更多",cancelText:"沒有興趣",onConfirm:()=>{goosemod.ootb.enabled=!0,goosemod.ootb.store()},body:t.createElement("div",{className:"container-1rn8Cv"},t.createElement(e,{modules:[{name:"商店",description:"瞭解GooseMod商店以及裏面的内容"},{name:"設定",description:"瞭解GooseMod的設定和插件"},{name:"社群",description:"加入我們的Discord伺服器來問問題,給予開發團隊建議以及使用體驗,和實時跟隨開發進度"}]}),t.createElement(o,{className:"header-2MiVco",size:o.Sizes.SIZE_24},"瞭解關於GooseMod的一切"),t.createElement(s,{className:"byline-3REiHf",size:s.Sizes.SIZE_16,color:s.Colors.HEADER_SECONDARY},"本向導將帶領您瞭解GooseMod的核心功能"))})};var OOTB={__proto__:null,enabled:enabled,todo:todo,done:done,themes:themes,plugins:plugins,store:store,settings:settings,community:community,start:start};const setThisScope$6=e=>{},startLoadingScreen=()=>{},updateLoadingScreen=e=>{},stopLoadingScreen=()=>{},defaultSettings={changelog:!0,separators:!0,gmBadges:!0,attrs:!1,home:!0,devchannel:!1,snippets:!1,autoupdate:!0,newModuleNotifications:!1,placeholderimage:!1,collapsiblehome:!0,allThemeSettings:!1,debugToasts:!1},loadStore=()=>{const e=JSON.parse(goosemod.storage.get("goosemodGMSettings"))||{};return{...defaultSettings,...e,get:()=>target}},target={uninit:!0};var GMSettings=new Proxy({uninit:!0},{get:(e,t)=>(e.uninit&&(e=loadStore()),e[t]??!1),set:(e,t,o)=>(e.uninit&&(e=loadStore()),e[t]=o,goosemod.storage.set("goosemodGMSettings",JSON.stringify(e)),!0)}),addToHome=async e=>{const{React:t,ReactDOM:o}=e.webpackModules.common,s=e.webpackModules.find((e=>e.default&&"ConnectedPrivateChannelsList"===e.default.displayName)),n=e.webpackModules.findByDisplayName("ListSectionItem"),{LinkButton:a}=e.webpackModules.findByProps("LinkButton"),r=e.webpackModules.findByProps("interactive","selected"),i=e.webpackModules.findByProps("channel","linkButtonIcon"),d=e.webpackModules.findByProps("headerText","privateChannelsHeaderContainer"),l=e.webpackModules.findByProps("icon","iconBadge","title"),c=e.webpackModules.findByProps("scrollerBase","auto","thin"),m={themes:t.createElement(e.webpackModules.findByDisplayName("Eye"),{width:24,height:24}),plugins:t.createElement(e.webpackModules.findByDisplayName("InlineCode"),{width:24,height:24}),snippets:t.createElement(e.webpackModules.findByDisplayName("Pictures"),{width:24,height:24}),expandable:t.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:`${l.icon}`,width:24,height:24})},p=(await Promise.resolve().then((function(){return header$3}))).default(),g=e.webpackModules.findByDisplayName("LoadingPopout"),u=(e,o,s)=>t.createElement(p,{icon:e,title:o,id:s}),h=(e,o)=>t.createElement("div",{className:e?"":`${c.auto}`,id:"gm-settings-inject",style:{padding:"22px",backgroundColor:"var(--background-primary)",height:"100%",overflow:e?"":"hidden scroll"}},o),f=e.webpackModules.findByProps("transitionTo"),y=(e,t,o=0)=>{if(o>5)return!1;const s=e.parentElement;return s.classList.contains(t)&&s||y(s,t,o+1)},b=(...e)=>e.map((e=>document.getElementsByClassName(e)[0])).find((e=>e));let S=e.settings.gmSettings.collapsiblehome&&goosemod.storage.get("goosemodHomeExpanded")||!0,w={plugins:e.settings.items.find((e=>"插件"===e[1])),themes:e.settings.items.find((e=>"主題"===e[1])),snippets:e.settings.items.find((e=>"小插件"===e[1]))},x={plugins:e.settings._createItem(w.plugins[1],w.plugins[2],!1),themes:e.settings._createItem(w.themes[1],w.themes[2],!1),snippets:e.settings._createItem(w.snippets[1],w.snippets[2],!1)};const v=(s,n)=>{const a=[...b("content-98HsJk","content-1SgpWY").children].find(((e,t)=>0!==t&&!e.classList.contains("erd_scroll_detection_container")));for(const e of b("scroller-1JbKMe","scroller-WSmht3").children[0].children)e.children[0]?.classList?.remove?.(r.selected,i.interactiveSelected);setTimeout((()=>{document.getElementById(`gm-home-${n}`).parentElement.classList.add(r.selected,i.interactiveSelected)}),0);const d="snippets"!==n&&Array.isArray(x[n].props.children)?x[n].props.children.filter((e=>"card"===e.props.type)).length:0,l="snippets"!==n?e.moduleStoreAPI.modules.filter((e=>"plugins"===n?!e.tags.includes("theme"):e.tags.includes("theme"))).length:0;if((d!==l||e.settings[`regen${n}`])&&(delete e.settings[`regen${n}`],x[n]=t.createElement("div",{className:"gm-store-loading-container"},t.createElement(g)),(async()=>{"snippets"!==n&&w[n][2].filter((e=>"card"===e.type)).length!==l&&await e.moduleStoreAPI.updateStoreSetting(),x[n]=e.settings._createItem(w[n][1],w[n][2],!1),document.querySelector(`#gm-home-${n}`).click()})()),1===a.children.length&&o.render(((e,o,s,n)=>t.createElement("div",{style:{height:"100%",overflow:"hidden"}},u(e,o,s),h(!1,n)))(m[n],s,n,x[n]),a.children[0]),2===a.children.length||3===a.children.length){let e=a.children.length-2;const t=a.children[e+1].classList.contains("stickyScroller-24zUyY");t&&(e=0),a.children[e+0].className="",o.render(u(m[n],s,n),a.children[e+0]),0!==e&&a.children[e+1].children[1]&&(a.children[e+1].children[1].style.display="none"),t&&(e=1),o.render(h(t,x[n]),0!==e?a.children[e+1].children[0]:a.children[e+1])}e.ootb.enabled&&e.ootb.todo.includes(n)&&(e.ootb[n](),e.ootb.done(n))},k=e.settings.gmSettings.snippets;e.settingsUninjects.push(e.patcher.patch(s,"default",((o,s)=>{if(s.props.children.props.children.some((e=>!0===e?.goosemod)))return;const c=e=>(e.goosemod=!0,e);setTimeout((()=>{b("scroller-1JbKMe","scroller-WSmht3").addEventListener("click",(e=>{const t=y(e.target,i.link);t&&!t.id.startsWith("gm-home-")&&(document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.parentElement.classList.remove(r.selected,i.interactiveSelected))),setTimeout((()=>{null!==document.getElementById("gm-settings-inject")&&(f.transitionTo("/invalid"),f.back())}),1))}))}),10),s.props.children.props.children.push(c(t.createElement(n,{className:d.privateChannelsHeaderContainer},t.createElement("span",{className:d.headerText},"GooseMod"),e.settings.gmSettings.collapsiblehome?t.createElement("div",{className:`${d.privateChannelRecipientsInviteButtonIcon} ${l.iconWrapper} ${l.clickable} gm-category-collapser`,style:{transform:`rotate(${S?"0":"-90"}deg)`,width:"22px",left:S?"0px":"-2px",top:S?"-6px":"-2px"},onClick:()=>{S=!S,goosemod.storage.set("goosemodHomeExpanded",S);const e=document.querySelector(".gm-category-collapser");e.style.transform=`rotate(${S?"0":"-90"}deg)`,e.style.left=S?"0px":"-2px",e.style.top=S?"-6px":"-2px";document.querySelectorAll('[id^="gm-home-"]').forEach((e=>e.style.display=S?"":"none"))}},m.expandable):null)),c(t.createElement(a,{style:{display:S||"主題"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.themes,onClick:()=>v("主題","themes"),id:"gm-home-themes",text:"主題",selected:!1})),c(t.createElement(a,{style:{display:S||"插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.plugins,onClick:()=>v("插件","plugins"),id:"gm-home-plugins",text:"插件",selected:!1})),k?c(t.createElement(a,{style:{display:S||"小插件"===b("title-29uC1r","title-17SveM")?.textContent?"block":"none"},icon:()=>m.snippets,onClick:()=>v("小插件","snippets"),id:"gm-home-snippets",text:"小插件",selected:!1})):null)}))),b("privateChannels-1nO12o","privateChannels-oVe7HL")&&(f.transitionTo("/invalid"),f.back()),(async()=>{await e.moduleStoreAPI.updateStoreSetting();for(const t of["themes","plugins"])x[t]=e.settings._createItem(w[t][1],w[t][2],!1);if(!k)return;const t=JSON.parse(goosemod.storage.get("goosemodSnippets"))||{};for(const e in t){const o=t[e];t[e]=document.createElement("style"),t[e].appendChild(document.createTextNode(o)),document.body.appendChild(t[e])}const o=async(o,s)=>{const{fetchMessages:n}=e.webpackModules.findByProps("fetchMessages","sendMessage"),{getRawMessages:a}=e.webpackModules.findByProps("getMessages"),{getChannel:r,hasChannel:i}=e.webpackModules.findByProps("getChannel","getDMFromUserId");if(!i(o))return;await n({channelId:o});const d=r(o),l=Object.values(a(o)).filter((e=>e.content.includes("```css")&&!e.message_reference&&!e.content.includes("quick CSS")&&!e.content.includes("Theme Toggler"))).sort(((e,t)=>t.attachments.length+t.embeds.length-(e.attachments.length+e.embeds.length))),c=e.settings.items.find((e=>"小插件"===e[1]));c[2].push({type:"store-header",text:s},...l.map((o=>({type:"card",tags:[o.id],lastUpdated:0,discordMessage:{guild:d.guild_id,channel:d.id,message:o.id},images:[o.attachments?.[0]?.proxy_url||o.embeds?.[0]?.thumbnail?.proxy_url].filter((e=>e)),name:"",author:[{name:o.author.username,id:o.author.id,avatar:o.author.avatar}],subtext:o.content.replace(/```css(.*)```/gs,""),buttonText:t[o.id]?"移除":"下載",buttonType:t[o.id]?"danger":"brand",onclick:()=>{const s=c[2].find((e=>e.tags?.includes(o.id))),n=document.querySelector(`[class*="${o.id}"]`).querySelector("button");e.settings.regensnippets=!0,t[o.id]?(t[o.id].remove(),delete t[o.id],n.className=n.className.replace("lookOutlined-3sRXeN colorRed-1TFJan","lookFilled-1Gx00P colorBrand-3pXr91"),n.textContent="下載",s.buttonText="下載",s.buttonType="brand"):(t[o.id]=document.createElement("style"),t[o.id].appendChild(document.createTextNode(/```css(.*)```/s.exec(o.content)[1])),document.body.appendChild(t[o.id]),n.className=n.className.replace("lookFilled-1Gx00P colorBrand-3pXr91","lookOutlined-3sRXeN colorRed-1TFJan"),n.textContent="移除",s.buttonText="移除",s.buttonType="danger");const a=Object.assign({},t);for(const e in a)a[e]=a[e].textContent;goosemod.storage.set("goosemodSnippets",JSON.stringify(a))},showToggle:!1,isToggled:()=>!1}))))};await o("755005803303403570","Powercord CSS Snippets"),await o("836694789898109009","BetterDiscord CSS Snippets"),await o("449569809613717518","Black Box CSS Snippets"),x.snippets=e.settings._createItem(w.snippets[1],w.snippets[2],!1)})()},addToContextMenu=(e,t)=>{const o=t=>({label:t,action:async()=>{e.settings.openSettings(),await sleep(10);let o=t;switch(o){case"設定":o="settings";break;case"插件":o="plugins";break;case"主題":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}document.querySelector(`[aria-controls="gm-${o.replace(/ /g,"-").toLowerCase()}-tab"]`).click()}});e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod",sub:[o("設定"),t?void 0:o("插件"),t?void 0:o("主題"),o("更新日志")].filter((e=>e))})),e.settingsUninjects.push(e.patcher.contextMenu.patch("user-settings-cog",{label:"GooseMod 模組",sub:()=>e.settings.items.slice(e.settings.items.indexOf(e.settings.items.find((e=>"GooseMod 模組"===e[1])))+1).map((e=>o(e[1])))}))},addToSettingsSidebar=async(e,t)=>{let o;for(;!(o=e.webpackModules.findByDisplayName("SettingsView"));)await sleep(50);const s=e.webpackModules.findByDisplayName("Text"),{React:n}=e.webpackModules.common;e.settingsUninjects.push(e.patcher.patch(o.prototype,"getPredicateSections",((o,a)=>{const r=a.find((e=>"logout"===e.section));return r?(a.splice(a.indexOf(r),0,...e.settings.items.filter((e=>!(t.home&&("插件"===e[1]||"主題"===e[1]||"小插件"===e[1])||!t.snippets&&"小插件"===e[1]))).map((t=>{switch(t[0]){case"item":let o=t[1];switch(o){case"設定":o="settings";break;case"插件":o="plugins";break;case"主題":o="themes";break;case"小插件":o="snippets";break;case"更新日志":o="changelog"}let s={section:"gm-"+o,label:t[1],predicate:()=>{},element:function(){if("function"==typeof t[3])return document.querySelector(".item-3XjbnG.selected-g-kMVV:not(.item-3mHhwr)").click(),t[3](),n.createElement("div");const o=document.querySelector(".standardSidebarView-E9Pc3j nav > div");return"插件"!==t[1]&&"主題"!==t[1]&&"小插件"!==t[1]||(setTimeout((()=>{document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="218px",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="calc(100vw - 218px - 60px - 20px)"}),10),o.addEventListener("click",(e=>{0!==e.clientX&&"插件"!==e.target.textContent&&"主題"!==e.target.textContent&&"小插件"!==e.target.textContent&&(document.querySelector(".sidebarRegion-VFTUkN").style.maxWidth="50%",document.querySelector(".contentColumnDefault-1VQkGM").style.maxWidth="740px")}))),e.settings._createItem(t[1],t[2])}};return t[4]&&(s.color="#f04747"),s;case"heading":return{section:"HEADER",label:t[1]};case"separator":return{section:"DIVIDER"}}})),{section:"DIVIDER"}),a.push({section:"DIVIDER"},{section:"CUSTOM",element:()=>n.createElement("div",{className:"info-3pQQBb"},n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod"," ",e.versioning.version," ",n.createElement("span",{className:"versionHash-mssSIL"},"(",e.versioning.hash.substring(0,7),")")),n.createElement(s,{className:"line-18uChy",size:s.Sizes.SIZE_12,color:s.Colors.MUTED,tag:"span"},"GooseMod Ext"," ",window.gmExtension))}),a):a}))),e.settings.isSettingsOpen()&&e.settings.reopenSettings()},addBaseItems=(e,t,o)=>{let s=e.settings.items;e.settings.items=[],e.settings.createHeading("GooseMod");const n=async(o,s)=>{switch(o){case"changelog":if(s){const o=[["item","更新日志",[""],async()=>{show()},!1]];t.separators&&o.unshift(["separator"]),e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Themes"===e[1])))+1,0,...o)}else e.settings.items.splice(e.settings.items.indexOf(e.settings.items.find((e=>"Change Log"===e[1]))),t.separators?2:1);await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"devchannel":s?goosemod.storage.set("goosemodUntetheredBranch","dev"):goosemod.storage.remove("goosemodUntetheredBranch");break;case"separators":if(s)t.home||goosemod.settings.items.splice(2,0,["separator"]),t.changelog&&goosemod.settings.items.splice(4,0,["separator"]);else{let t=!0;e.settings.items=e.settings.items.filter(((o,s)=>(e.settings.items[s+1]&&e.settings.items[s+1][1]&&"GooseMod 模組"===e.settings.items[s+1][1]&&(t=!1),!("separator"===o[0]&&t))))}await e.settings.reopenSettings(),e.settings.openSettingItem("Settings");break;case"gmBadges":e.gmBadges[s?"addBadges":"removeBadges"]()}t[o]=s},a=async()=>{await e.confirmDialog("刷新","必須刷新","此設定**必須刷新後才會有效**。刷新前可能會遇到一些**奇怪的行為**。")&&location.reload()};e.settings.createItem("設定",["",{type:"header",text:"設定"},{type:"toggle",text:"GooseMod 更新日誌",subtext:"在 GooseMod 設定中顯示「更新日誌」",onToggle:e=>n("changelog",e),isToggled:()=>t.changelog},{type:"toggle",text:"單獨顯示重要設定",subtext:"在 GooseMod 設定中用橫杠區分開核心設定與其他設定",onToggle:e=>n("separators",e),isToggled:()=>t.separators},{type:"toggle",text:"將商店放在主菜單",subtext:"將 GooseMod 商店一欄放在主菜單而非使用者設定裏",onToggle:e=>{n("home",e),a()},isToggled:()=>t.home},{type:"header",text:"商店"},{type:"toggle",text:"自動更新",subtext:"將每小時更新源和模組内容",onToggle:e=>n("autoupdate",e),isToggled:()=>t.autoupdate},{type:"toggle",text:"新模組通知",subtext:"商店有新模組時,顯示通知",onToggle:e=>n("newModuleNotifications",e),isToggled:()=>t.newModuleNotifications},{type:"header",text:"外觀"},{type:"toggle",text:"GooseMod 徽章",subtext:"顯示 GooseMod 的自定義徽章",onToggle:e=>n("gmBadges",e),isToggled:()=>t.gmBadges},{type:"header",text:"實用工具"},{type:"text-and-button",text:"重灌緩存",subtext:"重灌大部分 GooseMod 的緩存",buttonText:"重置",onclick:async()=>{goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&e.includes("Cache"))).forEach((e=>goosemod.storage.remove(e))),a()}},{type:"text-and-button",text:"開始向導",subtext:"重新開啓 GooseMod 的初始向導",buttonText:"開始",onclick:async()=>{e.settings.closeSettings(),e.ootb.start()}},{type:"text-and-button",text:"複製調製訊息",subtext:"將複製 GooseMod 的調試訊息方便提交",buttonText:"複製",onclick:async()=>{const{copy:t}=e.webpackModules.findByProps("copy","SUPPORTS_COPY");t(e.genDebugInfo())}},{type:"text-and-danger-button",text:"重置 GooseMod",subtext:"完全重灌 GooseMod:移除所有的模組以及設定",buttonText:"重置",onclick:async()=>{await e.confirmDialog("重置","重置 Goosemod","確認將完全重置 GooseMod,刪除所有首選項和模組;就像您第一次安裝 GooseMod 一樣。這是不可逆的。")&&(await e.remove(),window.location.reload())}},{type:"header",text:"備份"},{type:"text-and-button",text:"創建備份",subtext:"將備份目前 GooseMod 的模組和設定",buttonText:"備份",onclick:()=>{const e=goosemod.storage.keys().filter((e=>e.toLowerCase().startsWith("goosemod")&&!e.includes("Cache"))).reduce(((e,t)=>(e[t]=goosemod.storage.get(t),e)),{}),t=JSON.stringify(e),o=document.createElement("a");o.style.display="none";const s=new Blob([t],{type:"application/json"});o.href=URL.createObjectURL(s),o.download="goosemodBackup.json",document.body.appendChild(o),o.click(),o.remove()}},{type:"text-and-button",text:"恢復備份",subtext:"從一個備份裏恢復 GooseMod 的模組和設定(**不要恢復您不信任的備份**)",buttonText:"回檔",onclick:async()=>{const e=document.createElement("input");e.style.display="none",e.type="file",e.click(),await new Promise((t=>{e.onchange=()=>{t()}}));const t=e.files[0];if(!t)return;const o=new FileReader;o.onload=()=>{const e=JSON.parse(o.result);for(const t in e)t.startsWith("goosemod")&&goosemod.storage.set(t,e[t]);location.reload()},o.readAsText(t)}},{type:"header",text:"小調整",collapsed:!0,collapseOffset:1},{type:"subtext",text:"一些細微的調整能讓你更加深度客制化 GooseMod"},{type:"toggle",text:"占位圖",subtext:"能讓商店裏沒有圖片的模組顯示一張占位的圖片",onToggle:e=>{n("placeholderimage",e)},isToggled:()=>t.placeholderimage},{type:"toggle",text:"可摺叠的條目",subtext:"讓 GooseMod 在首頁的條目可以摺叠",onToggle:e=>{n("collapsiblehome",e)},isToggled:()=>t.collapsiblehome},{type:"header",text:"測試功能",collapsed:!0,collapseOffset:1},{type:"subtext",text:"測試中的功能基本都是未開發完畢的半成品,並極大可能會降低 GooseMod 的體驗"},{type:"toggle",experimental:!0,text:"額外數據標簽",subtext:"一些主題依賴於這些額外的數據標簽來正常工作",onToggle:e=>{n("attrs",e),a()},isToggled:()=>t.attrs},{type:"toggle",experimental:!0,text:"小插件",subtext:"在商店中顯示小插件一欄",onToggle:e=>{n("snippets",e),a()},isToggled:()=>t.snippets},{type:"toggle",experimental:!0,text:"强制主題設定",subtext:"將强制所有主題使用自動生成的設定",onToggle:e=>{n("allThemeSettings",e),a()},isToggled:()=>t.allThemeSettings},{type:"toggle",experimental:!0,text:"Topaz",subtext:"Load Topaz with GooseMod. Topaz is in alpha and very experimental.",onToggle:e=>{e?goosemod.storage.set("goosemodTopaz",!0):goosemod.storage.remove("goosemodTopaz"),a()},isToggled:()=>goosemod.storage.get("goosemodTopaz")},{type:"gm-footer"}]),t.separators&&!t.home&&e.settings.createSeparator();let r="下載數",i="全部",d="",l=!1;const c=async()=>{if(l)return;l=!0;const t=t=>{const o=t.querySelectorAll(".title-31JmR4, .title-2dsDLn"),a=o[1],d=[...o[0].getElementsByClassName("gm-store-author-name")].map((e=>e.textContent.split("#")[0])),l=a.childNodes[0].wholeText,c=t.querySelector(".description-3_Ncsb, .description-30xx7u").innerText,m=s.test(l)||s.test(c),p=t.querySelector(".container-3auIfb, .container-2nx-BQ").classList.contains("hide-toggle")?"商店":"已安裝";switch(r){case"A-Z":t.style.order="";break;case"上次更新時間":{const o=e.moduleStoreAPI.modules.find((e=>e.name===l.trim()));t.style.order=3e9-o.lastUpdated;break}case"下載數":t.style.order=1e4-parseInt(t.children[4].children[0].ariaLabel)}t.style.display=!m||"商店"!==n&&n!==p||"全部"!==i&&!d.includes(i.split(" (").slice(0,-1).join(" ("))?"none":"block"},o=[...document.querySelectorAll(":not(.gm-store-category) > div > .gm-store-card")],s=new RegExp(`.*${d}.*`,"i");let n=document.querySelector(".selected-3s45Ha, .selected-g-kMVV")?.textContent||"商店";"商店"!==n&&"已安裝"!==n&&(n="商店"),o.forEach(t);const a=""===d&&"商店"===n&&"全部"===i;[...document.getElementsByClassName("gm-store-category")].forEach((e=>e.style.display=a?"block":"none"));const c=document.querySelector(":not(.gm-store-category) > .gm-store-header");if(c&&(c.style.height=a?"":"0px",c.style.opacity=a?"":"0",c.style.margin=a?"":"0"),document.querySelector(".gm-store-card-loading-placeholder")){let e=[...document.querySelectorAll(".gm-store-card-loading-placeholder")];for(;0!==e.length;)e=e.filter((e=>"gm-store-card-loading-placeholder"===e.className||(t(e),!1))),await sleep(10)}if(c&&!a&&"沒有結果"!==c.textContent&&o.every((e=>"none"===e.style.display))){if(c.style.height="",c.style.opacity="",c.style.margin="",c.dataset.original=c.textContent,c.children[0].textContent="沒有結果",""!==d&&"商店"===n&&"全部"===i)if(o[0]&&o[0].classList.contains("theme")){0!==goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="沒有結果,你想找的是個插件嗎?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-plugins").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}else{0!==goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme")&&(s.test(e.name)||s.test(e.description)))).length&&(c.children[0].textContent="沒有結果,你想找的是個主題嗎?",c.style.cursor="pointer",c.onclick=async()=>{const e=d;document.getElementById("gm-home-themes").click(),await sleep(100);const t=document.querySelector(".input-3Xdcic, .input-2m5SfJ");t.value=e,t.__reactProps$.onChange({currentTarget:{value:e}})})}}else c&&"所有主題"!==c.textContent&&"所有插件"!==c.textContent&&(c.children[0].textContent=c.dataset.original,c.style.cursor="",c.onclick=()=>{});l=!1};e.settings.updateModuleStoreUI=c,["插件","主題"].forEach(((t,o)=>e.settings.createItem(t,["",{type:"search",placeholder:0===o?"搜索插件":"搜索主題",onchange:e=>{d=e,c()},storeSpecific:!0},{type:"dropdown-individual",label:"排列方式",options:["下載數","A-Z","上次更新時間"],onchange:e=>{r=e,c()}},{type:"dropdown-individual",label:"作者",options:()=>{const t=e.moduleStoreAPI.idCache.getCache(),o=[...e.moduleStoreAPI.modules.reduce(((e,o)=>{let s=o.authors;Array.isArray(s)||(s=[s]);for(const o of s){let s=o;if("object"==typeof o)s=o.n;else if(o.match(/^[0-9]{17,18}$/))s=t[o]?.data?.username;else{const e=o.match(/(.*) \(([0-9]{17,18})\)/);null!==e&&(s=e[1])}s&&e.set(s,(e.get(s)||0)+1)}return e}),new Map).entries()].sort(((e,t)=>t[1]-e[1])).map((e=>`${e[0]} (${e[1]})`));return o.unshift("全部"),o},onchange:e=>{i=e,c()}},{type:"store-category",text:"最高下載數",sort:(e,t)=>t.github?.stars-e.github?.stars},{type:"store-category",text:"最近更新",sort:(e,t)=>t.lastUpdated-e.lastUpdated},{type:"store-header",text:0===o?"所有插件":"所有主題"},{type:"gm-footer"}]))),e.settings.createItem("小插件",["",{type:"search",placeholder:"Search Snippets",onchange:e=>{const t=document.getElementsByClassName("gm-store-card"),o=new RegExp(`.*${e}.*`,"i"),s=e=>{for(const t of e){const e=t.getElementsByClassName("markdown-11q6EU")[0].textContent,s=o.test(e);t.style.display=s?"":"none"}};0===t.length?setTimeout((()=>s(document.getElementsByClassName("gm-store-card"))),10):s(t)},storeSpecific:!0}]),t.changelog&&(t.separators&&e.settings.createSeparator(),e.settings.createItem("更新日志",[""],(async()=>{show()}))),e.settings.createSeparator(),e.settings.createHeading("GooseMod 模組"),e.settings.items=e.settings.items.concat(s)},getItems=async()=>({divider:(await Promise.resolve().then((function(){return divider}))).default(),header:(await Promise.resolve().then((function(){return header$1}))).default(),toggle:(await Promise.resolve().then((function(){return toggle$1}))).default(),text:(await Promise.resolve().then((function(){return text$1}))).default(),"text-and-child":(await Promise.resolve().then((function(){return textAndChild$1}))).default(),"text-and-button":(await Promise.resolve().then((function(){return textAndButton$1}))).default(),"text-and-color":(await Promise.resolve().then((function(){return textAndColor$1}))).default(),button:(await Promise.resolve().then((function(){return button$1}))).default(),search:(await Promise.resolve().then((function(){return search$1}))).default(),"dropdown-individual":(await Promise.resolve().then((function(){return dropdownIndividual$1}))).default(),"store-header":(await Promise.resolve().then((function(){return storeHeader}))).default(),card:(await Promise.resolve().then((function(){return card}))).default(),"store-category":(await Promise.resolve().then((function(){return storeCategory$1}))).default(),custom:(await Promise.resolve().then((function(){return custom$1}))).default(),"text-input":(await Promise.resolve().then((function(){return textInput$1}))).default(),subtext:(await Promise.resolve().then((function(){return subtext$1}))).default()});const gmSettings=GMSettings;let Items={},goosemodScope$6={};const setThisScope$5=async e=>{goosemodScope$6=e,Items=await getItems()},removeModuleUI=(e,t)=>{const o=void 0===goosemodScope$6.modules[e];o&&(goosemodScope$6.modules[e]=Object.assign({},goosemodScope$6.disabledModules[e]),delete goosemodScope$6.disabledModules[e]),goosemodScope$6.moduleStoreAPI.moduleRemoved(goosemodScope$6.modules[e]),o||goosemodScope$6.modules[e].goosemodHandlers.onRemove(),delete goosemodScope$6.modules[e],goosemodScope$6.moduleSettingsStore.clearModuleSetting(e),t&&goosemodScope$6.settings.openSettingItem(t)},isSettingsOpen=()=>null!==document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma"),closeSettings=()=>{let e=document.querySelector(".standardSidebarView-E9Pc3j .closeButton-PCZcma");if(null===e)return!1;e.click()},openSettings=()=>{document.querySelector('.flex-2S1XBF.flex-3BkGQD.horizontal-112GEH.horizontal-1Piu5-.flex-3BkGQD.directionRow-2Iu2A9.justifyStart-2Mwniq.alignStretch-Uwowzr.noWrap-hBpHBz > [type="button"]:last-child').click()},openSettingItem=e=>{try{const t=[...document.querySelector(".standardSidebarView-E9Pc3j nav > div").children];return t[1].click(),setTimeout((()=>t.find((t=>t.textContent===e)).click()),5),!0}catch(e){return!1}},reopenSettings=async()=>{goosemodScope$6.settings.closeSettings(),await sleep(500),goosemodScope$6.settings.openSettings(),await sleep(100)};let items=[];const createItem=(e,t,o,s=!1)=>{goosemodScope$6.settings.items.push(["item",e,t,o,s])},removeItem=e=>{const t=goosemodScope$6.settings.items.indexOf(goosemodScope$6.settings.items.find((t=>t[1]===e)));if(-1===t)return!1;goosemodScope$6.settings.items.splice(t,1)},createHeading=e=>{goosemodScope$6.settings.items.push(["heading",e])},createSeparator=()=>{goosemodScope$6.settings.items.push(["separator"])},_createItem=(e,t,o=!0)=>{const{React:s}=goosemodScope$6.webpackModules.common,n=goosemodScope$6.webpackModules.findByDisplayName("FormSection"),a=goosemodScope$6.webpackModules.findByDisplayName("FormTitle"),r=()=>t.slice(1).map(((t,o)=>{t.type.includes("danger-button")&&(t.type=t.type.replace("danger-",""),t.danger=!0);const n=Items[t.type];return n?s.createElement(n,{i:o,...t,itemName:e}):s.createElement("div")}));return o?s.createElement(n,{className:"插件"===e||"主題"===e?"gm-store-settings":""},t[1].prototype?.render?null:s.createElement(a,{tag:"h1"},e),t[1].prototype?.render?s.createElement(t[1]):r()):s.createElement("div",{},r())},makeGooseModSettings=()=>{goosemodScope$6.settingsUninjects=[],addBaseItems(goosemodScope$6,gmSettings),addToSettingsSidebar(goosemodScope$6,gmSettings),addToContextMenu(goosemodScope$6,gmSettings.home),gmSettings.home&&addToHome(goosemodScope$6);try{loadColorPicker()}catch(e){goosemodScope$6.logger.debug("settings.load","Failed to load color picker")}},loadColorPicker=()=>{const{findInReactTree:e}=goosemodScope$6.reactUtils;if(!goosemodScope$6.webpackModules.findByDisplayName("ColorPicker")){e(goosemodScope$6.webpackModules.findByDisplayName("GuildFolderSettingsModal").prototype.render.call({props:{},state:{}}).props.children,(e=>e.props?.colors)).type().props.children.type._ctor()}};var Settings={__proto__:null,gmSettings:gmSettings,get Items(){return Items},setThisScope:setThisScope$5,removeModuleUI:removeModuleUI,isSettingsOpen:isSettingsOpen,closeSettings:closeSettings,openSettings:openSettings,openSettingItem:openSettingItem,reopenSettings:reopenSettings,items:items,createItem:createItem,removeItem:removeItem,createHeading:createHeading,createSeparator:createSeparator,_createItem:_createItem,makeGooseModSettings:makeGooseModSettings},ab2str=e=>(new TextDecoder).decode(e);const evalGlobal=eval,makeSourceURL=e=>`${e} | GM Module`.replace(/ /g,"%20");let goosemodScope$5={};const setThisScope$4=e=>{goosemodScope$5=e},importModule=async(e,t=!1)=>{let o=e.name;goosemodScope$5.logger.debug("import",`Importing module: "${o}"`),void 0!==goosemodScope$5.modules[o]?.goosemodHandlers?.onImport&&(goosemodScope$5.logger.debug(`import.load.module.${o}`,"Module already imported, removing then installing new version"),await goosemodScope$5.modules[o].goosemodHandlers.onRemove()),"object"==typeof e.data&&(e.data=ab2str(e.data));goosemodScope$5[t?"disabledModules":"modules"][o]=Object.assign(evalGlobal("const goosemodScope=goosemod;"+e.data+` //# sourceURL=${makeSourceURL(e.name)}`),e.metadata),t||await goosemodScope$5.modules[o].goosemodHandlers.onImport()};let goosemodScope$4={};const setThisScope$3=e=>{goosemodScope$4=e},disableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};t[e]=!0,goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},enableModule=e=>{let t=JSON.parse(goosemod.storage.get("goosemodDisabled"))||{};delete t[e],goosemod.storage.set("goosemodDisabled",JSON.stringify(t))},checkDisabled=e=>Object.keys(JSON.parse(goosemod.storage.get("goosemodDisabled"))||{}).includes(e),saveModuleSettings=async()=>{let e=JSON.parse(goosemod.storage.get("goosemodModules"))||{};for(let t in goosemodScope$4.modules)if(goosemodScope$4.modules.hasOwnProperty(t))try{e[t]=await(goosemodScope$4.modules[t].goosemodHandlers.getSettings||(async()=>[]))()}catch(e){console.error("Failed to load settings to save module",t,e)}JSON.stringify(JSON.parse(goosemod.storage.get("goosemodModules")))!==JSON.stringify(e)&&goosemod.storage.set("goosemodModules",JSON.stringify(e))},clearModuleSetting=e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&(delete t[e],goosemod.storage.set("goosemodModules",JSON.stringify(t)))},clearSettings=()=>{goosemod.storage.remove("goosemodModules")},loadSavedModuleSetting=async e=>{let t=JSON.parse(goosemod.storage.get("goosemodModules"));t&&t[e]&&await(goosemodScope$4.modules[e].goosemodHandlers.loadSettings||(async()=>[]))(t[e])};var ModuleSettingsStore={__proto__:null,setThisScope:setThisScope$3,disableModule:disableModule,enableModule:enableModule,checkDisabled:checkDisabled,saveModuleSettings:saveModuleSettings,clearModuleSetting:clearModuleSetting,clearSettings:clearSettings,loadSavedModuleSetting:loadSavedModuleSetting};let openpgp;const loadLibrary=async()=>{let js=await(await fetch("https://api.goosemod.com/pgp.js",{cache:"force-cache"})).text();js=js.replace("detectNode:function(){","detectNode:function(){return false;"),openpgp=eval(js+";openpgp")},verifySignature=async(e,t,o)=>{openpgp||await loadLibrary();const s=await openpgp.readKey({armoredKey:e}),n=await openpgp.createMessage({text:o}),a=await openpgp.readSignature({armoredSignature:t}),r=await openpgp.verify({message:n,signature:a,verificationKeys:s}),{verified:i,keyID:d}=r.signatures[0];try{return await i,goosemod.logger.debug("pgp","verified, key id:",d.toHex()),!0}catch(e){return goosemod.logger.debug("pgp","failed to verify",e.message),!1}},hash=async(e,t)=>{const o=await crypto.subtle.digest(t,new TextEncoder("utf-8").encode(e));return Array.prototype.map.call(new Uint8Array(o),(e=>("00"+e.toString(16)).slice(-2))).join("")},sha512=e=>hash(e,"SHA-512");let goosemodScope$3={};const setThisScope$2=e=>{goosemodScope$3=e},getCache$1=()=>JSON.parse(goosemod.storage.get("goosemodJSCache")||"{}"),purgeCache$1=()=>goosemod.storage.remove("goosemodJSCache"),updateCache$1=(e,t,o)=>{let s=goosemodScope$3.moduleStoreAPI.jsCache.getCache();s[e]={hash:t,js:o},goosemod.storage.set("goosemodJSCache",JSON.stringify(s))},getJSForModule=async e=>{const t=goosemodScope$3.moduleStoreAPI.modules.find((t=>t.name===e)),o=goosemodScope$3.moduleStoreAPI.jsCache.getCache();if(o[e]&&t.hash===o[e].hash)return o[e].js;{const o=t.repo.split("/").slice(0,-1).join("/"),s=await(await fetch(`${o}/module/${e}.js?_=${Date.now()}`)).text();return goosemodScope$3.moduleStoreAPI.jsCache.updateCache(e,t.hash,s),s}};var JSCache={__proto__:null,setThisScope:setThisScope$2,getCache:getCache$1,purgeCache:purgeCache$1,updateCache:updateCache$1,getJSForModule:getJSForModule};const currentDate=new Date-0;let goosemodScope$2={},getUser,queueProcessInterval;const setThisScope$1=e=>{goosemodScope$2=e,getUser=goosemodScope$2.webpackModules.findByProps("getUser","fetchCurrentUser").getUser},queue=[],queueReturns=[],processQueue=async()=>{if(0===queue.length)return clearInterval(queueProcessInterval),void(queueProcessInterval=void 0);const e=queue.pop();queueReturns.push(await getUser(e))},getCache=()=>JSON.parse(goosemod.storage.get("goosemodIDCache")||"{}"),purgeCache=()=>goosemod.storage.remove("goosemodIDCache"),updateCache=(e,t)=>{let o=getCache();o[e]={data:t,time:currentDate},goosemod.storage.set("goosemodIDCache",JSON.stringify(o))},getDataForID=async e=>{const t=getCache();if(t[e]&&t[e].time>currentDate-864e5)return t[e].data;{let t;for(queue.push(e),queueProcessInterval||(queueProcessInterval=setInterval(processQueue,500),processQueue());;){if(t=queueReturns.find((t=>t.id===e)),t){queueReturns.splice(queueReturns.indexOf(t),1);break}await sleep(500)}return updateCache(e,t),t}};var IDCache={__proto__:null,setThisScope:setThisScope$1,getCache:getCache,purgeCache:purgeCache,updateCache:updateCache,getDataForID:getDataForID};let goosemodScope$1={};var moduleStoreAPI={setThisScope:e=>{goosemodScope$1=e,setThisScope$2(e),setThisScope$1(e)},modules:[],repos:[],apiBaseURL:"https://api.goosemod.com",storeApiBaseURL:"https://store.goosemod.com",jsCache:JSCache,idCache:IDCache,getSettingItemName:e=>e.tags.includes("theme")?"主題":"插件",hotupdate:async(e=!1)=>{e&&goosemodScope$1.updateLoadingScreen("Getting modules from repos..."),await goosemodScope$1.moduleStoreAPI.updateModules(),await goosemodScope$1.moduleStoreAPI.updateStoreSetting(),e&&goosemodScope$1.updateLoadingScreen("Updating modules...");const t={},o=[];for(const s in goosemodScope$1.modules){const n=goosemodScope$1.moduleStoreAPI.modules.find((e=>e.name===s))?.hash,a=goosemodScope$1.moduleStoreAPI.jsCache.getCache()[s]?.hash;if(void 0!==n&&void 0!==a&&n!==a){if(void 0===t[s.repo]){const e=goosemodScope$1.moduleStoreAPI.repos.find((e=>e.url===s.repo));if("untrusted"===goosemodScope$1.moduleStoreAPI.verifyPgp(e).trustState){goosemodScope$1.showToast(`Failed to verify repo ${e.meta.name}, refusing to update it's modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),t[s.repo]=!1;continue}t[s.repo]=!0}!1!==t[s.repo]&&(e&&goosemodScope$1.updateLoadingScreen(`Updating modules...\n${s}`),o.push(goosemodScope$1.moduleStoreAPI.importModule(s,goosemodScope$1.moduleSettingsStore.checkDisabled(s)).then((async()=>{}))))}}await Promise.all(o)},initRepos:async()=>{const e=async e=>(await(await fetch(`${e}?_=${Date.now()}`)).json()).meta,t=async t=>({url:t,enabled:!0,meta:await e(t)});goosemodScope$1.moduleStoreAPI.repos=JSON.parse(goosemod.storage.get("goosemodRepos"))||[await t("https://store.goosemod.com/goosemod.json"),await t("https://store.goosemod.com/ms2porter.json"),await t("https://store.goosemod.com/bdthemes.json"),await t("https://store.goosemod.com/pcthemes.json"),await t("https://store.goosemod.com/pcplugins.json")]},updateModules:async()=>{let e=[];if(goosemodScope$1.moduleStoreAPI.repos=(await Promise.all(goosemodScope$1.moduleStoreAPI.repos.map((async t=>{if(!t.enabled)return t;try{const o=await(await fetch(`${t.url}?_=${Date.now()}`)).text(),s=JSON.parse(o);return"untrusted"===await goosemodScope$1.moduleStoreAPI.verifyPgp(t).trustState?(goosemodScope$1.showToast(`Failed to verify repo: ${t.meta.name}, refusing to use new modules`,{timeout:1e4,type:"error",subtext:"GooseMod 商店"}),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name))),t):(e=e.concat(s.modules.map((e=>(e.repo=t.url,e)))).sort(((e,t)=>e.name.localeCompare(t.name))),{...t,meta:s.meta,resp:o})}catch(o){goosemodScope$1.showToast(`Failed to get repo: ${t.url}`,{timeout:5e3,type:"error",subtext:"GooseMod 商店"}),console.error(o),e=e.concat(goosemodScope$1.moduleStoreAPI.modules.filter((e=>e.repo===t.url))).sort(((e,t)=>e.name.localeCompare(t.name)))}return t})))).sort(((e,t)=>goosemodScope$1.moduleStoreAPI.repos.indexOf(e.url)-goosemodScope$1.moduleStoreAPI.repos.indexOf(t.url))),goosemodScope$1.settings.gmSettings.newModuleNotifications)for(const t of e){goosemodScope$1.moduleStoreAPI.modules.find((e=>t.name===e.name))||goosemodScope$1.showToast(`${t.name}`,{timeout:5e3,subtext:"New "+(t.tags.includes("theme")?"Theme":"Plugin")})}goosemodScope$1.moduleStoreAPI.modules=e,goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos.map((e=>(delete e.resp,e))))),goosemod.storage.set("goosemodCachedModules",JSON.stringify(goosemodScope$1.moduleStoreAPI.modules))},importModule:async(e,t=!1)=>{try{const o=goosemodScope$1.moduleStoreAPI.modules.find((t=>t.name===e)),s=await goosemodScope$1.moduleStoreAPI.jsCache.getJSForModule(e),n=await sha512(s);if(n!==o.hash)return goosemodScope$1.showToast(`Cancelled importing of ${e} due to hash mismatch`,{timeout:2e3,type:"danger",subtext:"GooseMod 商店"}),void console.warn("Hash mismatch",n,o.hash);await goosemodScope$1.importModule({name:e,data:s,metadata:o},t),t||(void 0!==goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[e].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(e));try{const e=goosemodScope$1.settings.items.find((e=>e[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(o)))[2].find((e=>e.subtext===o.description));e.buttonType="danger",e.buttonText="移除",e.showToggle=!0}catch(e){}}catch(e){console.error(e)}},moduleRemoved:e=>{let t=goosemodScope$1.settings.items.find((t=>t[1]===goosemodScope$1.moduleStoreAPI.getSettingItemName(e)))[2].find((t=>t.subtext===e.description));void 0!==t&&(t.buttonType="brand",t.buttonText="安裝",t.showToggle=!1)},parseAuthors:async e=>{const t="string"==typeof e?e.split(", "):e;return await Promise.all(t.map((async e=>{if("object"==typeof e)return{name:e.n,id:e.i,avatar:e.a};if(e.match(/^[0-9]{17,18}$/)){const t=await getDataForID(e);return{name:t.username,id:t.id,avatar:t.avatar}}const t=e.match(/(.*) \(([0-9]{17,18})\)/);return{name:t?.[1]||e,id:t?.[2]}})))},updateStoreSetting:async()=>{let e=goosemodScope$1.settings.items.filter((e=>"插件"===e[1]||"主題"===e[1]));for(const t of e)t[2]=t[2].filter((e=>"card"!==e.type));for(const t of goosemodScope$1.moduleStoreAPI.modules){const o=goosemodScope$1.moduleStoreAPI.getSettingItemName(t),s=e.find((e=>e[1]===o)),n=t.tags.includes("theme")?"themes":"plugins";s[2].push({type:"card",tags:t.tags,github:t.github,notice:t.notice,images:t.images?.map((e=>{if(e.startsWith("/")){e=t.repo.split("/").slice(0,-1).join("/")+e}return e})),lastUpdated:t.lastUpdated,buttonType:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"danger":"brand",showToggle:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name],name:t.name,author:await goosemodScope$1.moduleStoreAPI.parseAuthors(t.authors),subtext:t.description,subtext2:"0"===t.version||t.version.toLowerCase().includes("auto")?"":`v${t.version}`,buttonText:goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name]?"移除":"安裝",onclick:async()=>{if(goosemodScope$1.settings[`regen${n}`]=!0,goosemodScope$1.modules[t.name]||goosemodScope$1.disabledModules[t.name])goosemodScope$1.settings.removeModuleUI(t.name,o);else{if(t.dependencies&&t.dependencies.length>0)for(const e of t.dependencies)await goosemodScope$1.moduleStoreAPI.importModule(e);await goosemodScope$1.moduleStoreAPI.importModule(t.name)}},isToggled:()=>void 0===goosemodScope$1.disabledModules[t.name],onToggle:async e=>{goosemodScope$1.settings.ignoreVisualToggle?delete goosemodScope$1.settings.ignoreVisualToggle:(goosemodScope$1.settings[`regen${n}`]=!0,e?(goosemodScope$1.modules[t.name]=goosemodScope$1.disabledModules[t.name],delete goosemodScope$1.disabledModules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onImport(),void 0!==goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished&&await goosemodScope$1.modules[t.name].goosemodHandlers.onLoadingFinished(),await goosemodScope$1.moduleSettingsStore.loadSavedModuleSetting(t.name),goosemodScope$1.moduleSettingsStore.enableModule(t.name)):(goosemodScope$1.disabledModules[t.name]=goosemodScope$1.modules[t.name],await goosemodScope$1.modules[t.name].goosemodHandlers.onRemove(),delete goosemodScope$1.modules[t.name],goosemodScope$1.moduleSettingsStore.disableModule(t.name)))}})}},verifyPgp:async e=>{const t=t=>{const o={result:t,trustState:"verified"!==t&&e.oncePgp||"invalid_signature"===t||"no_signature"===t?"untrusted":"verified"===t?"trusted":"unknown",when:Date.now()},s=goosemodScope$1.moduleStoreAPI.repos.find((t=>t.url===e.url));return s?(s.pgp=o,"verified"===t&&(s.oncePgp=!0),goosemod.logger.debug("pgp.save",s),goosemod.storage.set("goosemodRepos",JSON.stringify(goosemodScope$1.moduleStoreAPI.repos)),s.pgp):o};goosemod.logger.debug("pgp","verifying repo:",e.meta.name);const o=async e=>{const t=await fetch(e+"?_="+Date.now());return!!t.ok&&await t.text()},s=await o(`https://goosemod.github.io/Keyserver/repos/${e.meta.name}.gpg`);if(!s)return goosemod.logger.debug("pgp","no public key, aborting"),t("no_public_key");const n=await o(e.url+".sig");if(!n)return goosemod.logger.debug("pgp","no signature, aborting"),t("no_signature");const a=e.resp||await o(e.url);return t(await verifySignature(s,n,a)?"verified":"invalid_signature")}};let css="",toSaveNext=!1;const init$3=()=>{injectHooks(),setInterval((()=>{toSaveNext&&(toSaveNext=!1,save())}),1e4)},save=()=>{[...document.body.classList].forEach((e=>{css=css.replace(new RegExp(`body.${e}`,"g"),"body")})),goosemod.storage.set("goosemodCSSCache",css),goosemod.showToast("Saved",{subtext:"CSS Cache",type:"debuginfo"})},injectHooks=()=>{const e=()=>toSaveNext=!0,t=CSSStyleSheet.prototype.insertRule,o=Node.prototype.appendChild;CSSStyleSheet.prototype.insertRule=function(o){t.apply(this,arguments),o.includes("body.")&&(css+=o,e())};const s=[document.body,document.head],n=t=>{t.appendChild=function(t){if(o.apply(this,arguments),"STYLE"===t.tagName){if(t.id.startsWith("ace"))return;n(t);for(const e of t.childNodes)css+=e.textContent;e()}t.data&&(css+=t.textContent,e())}};for(const e of s)n(e)},load=()=>{const e=document.createElement("style");e.id="gm-css-cache",e.appendChild(document.createTextNode(goosemod.storage.get("goosemodCSSCache")||"")),document.body.appendChild(e),goosemod.showToast("Loaded",{subtext:"CSS Cache",type:"debuginfo"}),init$3()},removeStyle=()=>{const e=document.getElementById("gm-css-cache");e&&e.remove()};var CSSCache={__proto__:null,init:init$3,load:load,removeStyle:removeStyle};let goosemodScope={},unpatchers=[];const setThisScope=e=>{goosemodScope=e},showSponsorModal=()=>{window.open("https://github.com/sponsors/CanadaHonk")},badgeUsers={sponsor:["506482395269169153","597905003717459968","405400327370571786","707309693449535599","302734867425132545","557429876618166283","250353310698176522","301088721984552961","700698485560705084","274209973196816385","274926795285987328","293094733159333889","202740603790819328","541210648982585354","516750892372852754","192760945766957066","206837744658415616","889366461703913573","294468537899024384","688437973330428047","341522422836625408","597072695875600385","987317921774723092","162970149857656832","584363189890711562","158176459037474816","949168996182261820","275808021605777409","499802781235019777"],dev:["506482395269169153"],translator:["290293141666267136","346338830011596800","425140480334888980","650178631129235456","186496078273708033","202740603790819328","717498477457702964"]},addBadges=()=>{unpatchers.push(goosemodScope.patcher.userBadges.patch("GooseMod 捐贈者","https://goosemod.com/img/goose_gold.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.sponsor:[]),(()=>{showSponsorModal()}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 翻譯者","https://goosemod.com/img/goose_globe.png",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.translator:[]),(()=>{}),{round:!0}),goosemodScope.patcher.userBadges.patch("GooseMod 開發者","https://goosemod.com/img/goose_glitch.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?badgeUsers.dev:[]),(()=>{}),{round:!0}),goosemod.patcher.guildBadges.patch("GooseMod 官方 Discord 伺服器","https://goosemod.com/img/logo.jpg",(()=>goosemodScope.settings.gmSettings.gmBadges?["756146058320674998"]:[]),(()=>{}),{round:!0}))},removeBadges=()=>{for(const e of unpatchers)e()};var GMBadges={__proto__:null,setThisScope:setThisScope,addBadges:addBadges,removeBadges:removeBadges};function getLocalStoragePropertyDescriptor(){const e=document.createElement("frame");e.src="about:blank",document.body.appendChild(e);let t=Object.getOwnPropertyDescriptor(e.contentWindow,"localStorage");return e.remove(),t}var fixLocalStorage=()=>{Object.defineProperty(window,"localStorage",getLocalStoragePropertyDescriptor())};const init$2=()=>{fixLocalStorage()},type$1="LocalStorage",set$1=(e,t)=>localStorage.setItem(e,t),get$1=e=>localStorage.getItem(e),remove$1=e=>localStorage.removeItem(e),keys$1=()=>Object.keys(localStorage);var impl_localstorage={__proto__:null,init:init$2,type:type$1,set:set$1,get:get$1,remove:remove$1,keys:keys$1};const backup$2=async({keys:e,get:t})=>{if(window.localStorage)for(const o of e())localStorage.setItem(o,t(o))},restore$2=async({set:e})=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>e(t,localStorage.getItem(t))))},clear$2=async()=>{window.localStorage&&Object.keys(localStorage).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>localStorage.removeItem(e)))};var parity_localStorage={__proto__:null,backup:backup$2,restore:restore$2,clear:clear$2};const backup$1=async({keys:e,get:t})=>{if(!window.DiscordNative?.userDataCache)return;const o=await DiscordNative.userDataCache.getCached()||{};for(const s of e())o[s]=t(s);DiscordNative.userDataCache.cacheUserData(JSON.stringify(o))},restore$1=async({set:e})=>{if(!window.DiscordNative?.userDataCache)return;const t=await DiscordNative.userDataCache.getCached();t&&Object.keys(t).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((o=>e(o,t[o])))},clear$1=async()=>{if(!window.DiscordNative?.userDataCache)return;const e=await DiscordNative.userDataCache.getCached();e&&Object.keys(e).filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((t=>{delete e[t],DiscordNative.userDataCache.cacheUserData(JSON.stringify(e))}))};var parity_userDataCache={__proto__:null,backup:backup$1,restore:restore$1,clear:clear$1},paritySystems=[parity_localStorage,parity_userDataCache];let storageCache={};const type="Extension",init$1=async()=>{window.localStorage||fixLocalStorage();const e=new Promise((e=>document.addEventListener("gmes_get_return",(async({detail:t})=>{storageCache=t,Object.keys(storageCache).length<5&&await restore(),e()}),{once:!0})));document.dispatchEvent(new CustomEvent("gmes_get")),await e,await backup()},restore=async()=>{console.log("GooseMod","Restoring storage...");for(const e of paritySystems)await e.restore({set:set})},backup=async()=>{console.log("GooseMod","Backing up storage...");for(const e of paritySystems)await e.backup({keys:keys,get:get})},set=(e,t)=>{storageCache[e]=t,document.dispatchEvent(new CustomEvent("gmes_set",{detail:{key:e,value:t}})),backup()},get=e=>storageCache[e]||null,remove=e=>{delete storageCache[e],document.dispatchEvent(new CustomEvent("gmes_remove",{detail:{key:e}})),backup()},clear=async()=>{keys().filter((e=>e.toLowerCase().startsWith("goosemod"))).forEach((e=>remove(e)));for(const e of paritySystems)await e.clear()},keys=()=>Object.keys(storageCache);var impl_extension={__proto__:null,type:type,init:init$1,restore:restore,backup:backup,set:set,get:get,remove:remove,clear:clear,keys:keys};const impl=window.gmExtension?impl_extension:impl_localstorage;var _Card=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.patcher.simpleTooltip(),o=new Intl.RelativeTimeFormat("en",{localeMatcher:"best fit",numeric:"auto",style:"long"}),s=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),n=goosemod.webpackModules.findByDisplayName("Switch"),a=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),r=goosemod.webpackModules.findByDisplayName("FormText"),i=goosemod.webpackModules.findByProps("formText","placeholder"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("openModal","updateModal"),c=goosemod.webpackModules.findByDisplayName("SmallMediaCarousel"),m=goosemod.webpackModules.findByDisplayName("Discord"),p=goosemod.webpackModules.findByDisplayName("Clock"),g=goosemod.webpackModules.findByDisplayName("Info"),u=e=>{const t=Math.floor((Date.now()-e)/1e3),s=[{label:"year",seconds:31536e3},{label:"month",seconds:2592e3},{label:"day",seconds:86400},{label:"hour",seconds:3600},{label:"minute",seconds:60},{label:"second",seconds:1}].find((e=>e.seconds{this.setState({loaded:!0,renderLoaded:!0})}),10)),this.props.checked!==this.props.isToggled()&&(this.props.checked=this.props.isToggled());let o=!1;this.state.forceDisplay&&(o=!0,this.state.forceDisplay=!1,delete this.state.forceDisplay);let{notice:h}=this.props;switch(h){case 1:h="Other users may notice your usage";break;case 2:h="Other users may question or judge your usage, use appropriately"}const f=()=>{const e=[...document.querySelectorAll(".title-2dsDLn + .colorStandard-1Xxp1s")].filter((e=>e.textContent===this.props.subtext)).map((e=>e.parentElement));for(const t of e){const e=t.__reactFiber$.return;e.pendingProps=this.props,e.memoizedState.renderLoaded=!0,e.stateNode.forceUpdate()}};return this.state.loaded?e.createElement("div",{className:["gm-store-card",this.props.mini?"gm-store-card-mini":"",...this.props.tags.map((e=>e.replace(/ /g,"|")))].join(" "),onClick:this.props.onClick,style:{display:this.props.i&&!o?"none":"block"}},e.createElement(c,{autoplayInterval:0,items:(this.props.images?.[0]?this.props.images:[goosemod.settings.gmSettings.placeholderimage?"/assets/2366391afb15ed6c2a019a0c0caa0797.svg":"data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="]).map((e=>({type:1,src:e}))),paused:!0,onCurrentItemClick:()=>{this.props.images?.[0]&&l.openModal((()=>e.createElement("div",{className:"gm-carousel-modal"},e.createElement(c,{items:this.props.images.map((e=>({type:1,src:e}))),autoplayInterval:5e3}))))}}),e.createElement("div",{className:[d.title,this.props.author.every((e=>!e.avatar))?"no-pfp":""].join(" ")},...this.props.author.map(((t,o)=>[t.avatar?e.createElement("img",{loading:"lazy",src:`https://cdn.discordapp.com/avatars/${t.id}/${t.avatar}.png?size=32`,className:"gm-store-author-pfp"}):null,e.createElement("span",{className:"gm-store-author-name"},t.name),o!==this.props.author.length-1?e.createElement("span",{className:i.description},", "):null]))),e.createElement("div",{className:d.title},this.props.name),e.createElement(r,{className:this.props.name?i.description:""},e.createElement(a,{className:"gm-settings-note-markdown"},this.props.subtext)),e.createElement("div",{},this.props.github?e.createElement(t,{text:this.props.github.stars,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor","aria-label":n,onMouseEnter:t,onMouseLeave:o,className:s},e.createElement("path",{d:"M12 .587l3.668 7.568 8.332 1.151-6.064 5.828 1.48 8.279-7.416-3.967-7.417 3.967 1.481-8.279-6.064-5.828 8.332-1.151z"})))):null,this.props.lastUpdated||this.props.subtext2?e.createElement(t,{text:(this.props.subtext2||"")+(this.props.subtext2&&this.props.lastUpdated?" | ":"")+(this.props.lastUpdated?u(1e3*this.props.lastUpdated):""),position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(p,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null,this.props.notice?e.createElement(t,{text:h,position:"left"},(({onMouseEnter:t,onMouseLeave:o,className:s,text:n})=>e.createElement(g,{width:24,height:24,"aria-label":n,className:s,onMouseEnter:t,onMouseLeave:o}))):null),e.createElement("div",{},e.createElement(s,{color:"danger"===this.props.buttonType?s.Colors.RED:s.Colors.BRAND,look:s.Looks.FILLED,size:s.Sizes.SMALL,onClick:()=>{this.props.onclick(),this.props.buttonType="danger"===this.props.buttonType?"":"danger",this.props.buttonText="移除"===this.props.buttonText?"安裝":"移除",this.props.showToggle=!this.props.showToggle,f()}},this.props.buttonText),this.props.github?e.createElement(s,{color:s.Colors.PRIMARY,size:s.Sizes.SMALL,onClick:()=>{window.open(`https://github.com/${this.props.github.repo}`)}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"}))):null,this.props.discordMessage?e.createElement(s,{color:s.Colors.GREY,size:s.Sizes.SMALL,onClick:()=>{const{transitionTo:e}=goosemod.webpackModules.findByProps("transitionTo"),{jumpToMessage:t}=goosemod.webpackModules.findByProps("jumpToMessage");e(`/channels/${this.props.discordMessage.guild}/${this.props.discordMessage.channel}`),t({channelId:this.props.discordMessage.channel,messageId:this.props.discordMessage.message,flash:!0})}},e.createElement(m,{width:"24",height:"24"})):null,e.createElement(n,{className:this.props.showToggle?"":"hide-toggle",checked:this.props.checked,disabled:!1,onChange:e=>{this.props.checked=!this.props.checked,this.state.renderLoaded=!0,this.state.forceDisplay=!0,this.props.onToggle(this.props.checked),f()}}))):e.createElement("div",{className:"gm-store-card-loading-placeholder"})}}},card={__proto__:null,default:_Card},ProfileStoreInit=()=>{const e=_Card(),{React:t,ReactDOM:o}=goosemod.webpackModules.common,s=goosemod.webpackModules.find((e=>"UserProfileModal"===e.default?.displayName)),n=goosemod.webpackModules.findByProps("auto","scrollerBase");goosemod.patcher.patch(s,"default",((s,a)=>{const r=goosemod.reactUtils.findInReactTree(a.props.children,(e=>e.props?.section));r&&goosemod.patcher.patch(r,"type",(([{user:{id:s}}],a)=>{const r=goosemod.moduleStoreAPI.modules.filter((e=>e.authors.some&&e.authors.some((e=>e.i===s))));if(0===r.length)return;const i=goosemod.settings.items.find((e=>"主題"===e[1]))[2],d=goosemod.settings.items.find((e=>"插件"===e[1]))[2],l=r.filter((e=>e.tags.includes("theme"))),c=r.filter((e=>!e.tags.includes("theme"))),m=a.props.children,p=m.props.children[0],g=o=>t.createElement(e,{...o,mini:!0,onClick:async()=>{document.querySelector(".backdrop-1wrmKB").click();goosemod.webpackModules.findByProps("transitionTo").transitionTo("/store"),await sleep(200),document.getElementById("gm-home-"+(o.tags.includes("theme")?"themes":"plugins")).click(),await sleep(2e3);const e=[...document.querySelectorAll(".title-31JmR4 + .colorStandard-2KCXvj")].filter((e=>e.textContent===o.subtext)).pop().parentElement;document.querySelector("#gm-settings-inject").scrollTo({top:e.offsetTop-12,behavior:"smooth"}),e.style.boxShadow="0 0 12px 6px rgb(88 101 242 / 30%)",setTimeout((()=>{e.style.boxShadow=""}),15e3)}});return goosemod.patcher.patch(m.props,"onItemSelect",(([e])=>{e.startsWith("GM_")&&setTimeout((()=>{const e=document.querySelector(".body-r6_QPy > :first-child");o.render(t.createElement("div",{className:[n.auto,"gm-modules-container"].join(" ")},...l.map((e=>i.find((t=>t.name===e.name)))).map((e=>g(e))),...c.map((e=>d.find((t=>t.name===e.name)))).map((e=>g(e)))),e)}),1)})),m.props.children.push(t.cloneElement(p,{id:"GM_MODULES"},"GooseMod 模組")),a}))}))},GenDebugInfo=()=>{const e={powercord:"powercord",vizality:"vizality",ED:"enhanceddiscord",BdApi:"betterdiscord"};return`Discord:\nClient: ${window.DiscordNative?"desktop":"web"}\nUser Agent: ${navigator.userAgent}\nRelease Channel: ${GLOBAL_ENV.RELEASE_CHANNEL}\nOther Mods: ${Object.keys(e).filter((e=>Object.keys(window).includes(e))).map((t=>e[t])).join(", ")}\n\nGooseMod:\nGM Version: ${goosemod.versioning.version} (${goosemod.versioning.hash})\nGM Branch: ${goosemod.versioning.branch}\nGM Extension Version: ${window.gmExtension}\nGM Storage Impl: ${goosemod.storage.type}\nModules: ${Object.keys(goosemod.modules).join(", ")}`};const scopeSetterFncs=[setThisScope$6,setThisScope$5,setThisScope$4,moduleStoreAPI.setThisScope,setThisScope$8,setThisScope$7,setThisScope$c,setThisScope$a,setThisScope$3,setThisScope$9,setThisScope],importsToAssign={startLoadingScreen:startLoadingScreen,stopLoadingScreen:stopLoadingScreen,updateLoadingScreen:updateLoadingScreen,settings:Settings,importModule:importModule,moduleSettingsStore:ModuleSettingsStore,webpackModules:WebpackModules,logger:Logger,showToast:showToast,confirmDialog:show$1,moduleStoreAPI:moduleStoreAPI,changelog:Changelog,goosemodChangelog:GoosemodChangelog,patcher:Patcher,attrs:Attrs,reactUtils:ReactUtils,cssCache:CSSCache,gmBadges:GMBadges,ootb:OOTB,storage:impl,genDebugInfo:GenDebugInfo},init=async function(){for(Object.assign(this,importsToAssign),await this.storage.init(),this.cssCache.load();void 0===window.webpackJsonp&&void 0===window.webpackChunkdiscord_app;)await sleep(50);for(;!this.webpackModules.findByProps("LinkButton");)await sleep(50);for(let e of scopeSetterFncs)try{await e(this)}catch(t){console.error("[GooseMod] Failed to scopeset",t,e)}this.versioning={version:"12.3",hash:"af2bcf99053777ff96fc286fd86d91d169c5573a",branch:goosemod.storage.get("goosemodUntetheredBranch"),lastUsedVersion:this.storage.get("goosemodLastVersion")},this.versioning.isDeveloperBuild=""===this.versioning.hash,this.storage.set("goosemodLastVersion",this.versioning.version),this.logger.debug("import.version.goosemod",`${this.versioning.version} (${this.versioning.hash})`),void 0!==window.DiscordNative&&this.logger.debug("import.version.discord",`${DiscordNative.app.getReleaseChannel()} ${DiscordNative.app.getVersion()}`),window.gmUntethered&&(this.untetheredVersion=window.gmUntethered.slice()),this.versioning.lastUsedVersion&&this.versioning.version!==this.versioning.lastUsedVersion&&this.goosemodChangelog.show(),this.startLoadingScreen(),this.updateLoadingScreen("Initialising internals...");let e=Object.keys(JSON.parse(this.storage.get("goosemodModules"))||{}),t=Object.keys(JSON.parse(this.storage.get("goosemodDisabled"))||{});this.modules=e.filter((e=>-1===t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.disabledModules=e.filter((e=>-1!==t.indexOf(e))).reduce(((e,t)=>(e[t]={goosemodHandlers:{}},e)),{}),this.moduleStoreAPI.modules=JSON.parse(this.storage.get("goosemodCachedModules"))||[],this.moduleStoreAPI.modules.cached=!0,this.settings.makeGooseModSettings(),await this.moduleStoreAPI.initRepos(),this.removed=!1,this.storage.get("goosemodCachedModules")||await this.moduleStoreAPI.updateModules(!0);let o=!1;0===e.length&&(o=!0),e=e.filter((e=>void 0!==this.moduleStoreAPI.modules.find((t=>t.name===e))));let s=e.find((e=>e.toLowerCase().includes("theme")));s&&e.unshift(e.splice(e.indexOf(s),1)[0]);let n=e.find((e=>"Hardcoded Color Fixer"===e));n&&e.unshift(e.splice(e.indexOf(n),1)[0]),o&&(e=["Fucklytics","Custom CSS"]),this.updateLoadingScreen("Importing modules from Store...");const a=[];for(let o of e)a.push(this.moduleStoreAPI.importModule(o,t.includes(o)));if(await Promise.all(a),this.cssCache.removeStyle(),this.settings.gmSettings.gmBadges&&this.gmBadges.addBadges(),this.settings.gmSettings.attrs&&this.attrs.patch(),this.saveInterval=setInterval((()=>{this.moduleSettingsStore.saveModuleSettings()}),3e3),this.remove=async()=>{this.settingsUninjects.forEach((e=>e())),clearInterval(this.saveInterval),clearInterval(this.hotupdateInterval),await this.storage.clear(),this.removed=!0;for(let e in this.modules)if(this.modules.hasOwnProperty(e)&&void 0!==this.modules[e].goosemodHandlers.onRemove)try{this.modules[e].goosemodHandlers.onRemove()}catch(e){}},this.moduleStoreAPI.hotupdate(!0),this.hotupdateInterval=setInterval((()=>{this.settings.gmSettings.autoupdate&&this.moduleStoreAPI.hotupdate()}),36e5),this.stopLoadingScreen(),this.settings.isSettingsOpen()&&this.settings.reopenSettings(),!this.storage.get("goosemodOOTB")){for(await sleep(1e3);document.querySelector(".modal-3O0aXp");)await sleep(100);this.ootb.start(),this.storage.set("goosemodOOTB",!0)}this.storage.get("goosemodTopaz")&&setTimeout((async()=>{(0,eval)(await(await fetch("https://goosemod.github.io/topaz/out.js",{cache:"no-store"})).text())}),1e3),ProfileStoreInit(),document.body.classList.add("goosemod")};window.goosemod={},init.bind(window.goosemod)();var modulesPreview=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("DiscoverStaticGuildCard"),o=e=>e.images?.map((t=>{if(t.startsWith("/")){t=e.repo.split("/").slice(0,-1).join("/")+t}return t}));return class extends e.PureComponent{render(){setTimeout((()=>{try{const e=document.querySelectorAll('.gm-modules-preview [class*="splashImage"]');e[e.length-3].src=o(this.props.modules[1])[0],e[e.length-2].src=o(this.props.modules[0])[0],e[e.length-1].src=o(this.props.modules[2])[0]}catch(e){}}),100);const s="placeholderCard-2jZYky";return e.createElement("div",{className:"gm-modules-preview"},e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[1]}}),e.createElement(t,{className:s,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[0]}}),e.createElement(t,{className:s,disabled:!0,small:!0,loading:!1,guild:{banner:null,splash:null,discoverySplash:null,icon:null,id:null,memberCount:null,presenceCount:null,...this.props.modules[2]}}))}}},modulesPreview$1={__proto__:null,default:modulesPreview},openReposModal=async()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem");class o extends e.Component{constructor(e){const t=e.onChange;e.onChange=e=>{t(e),this.props.value=e,this.forceUpdate()},super(e)}render(){return e.createElement("div",{},e.createElement(r,{style:{width:"100px",position:"absolute",right:"108px",marginTop:"33px"},color:i.colorPrimary,size:i.sizeSmall,onClick:this.props.buttonOpenLink},"開啟連結"),e.createElement(r,{style:{width:"92px",position:"absolute",right:"10px",marginTop:"33px"},color:i.colorRed,size:i.sizeSmall,onClick:this.props.buttonOnClick},"移除"),e.createElement(t,{...this.props}))}}let s;const n=async()=>{await goosemod.moduleStoreAPI.updateModules(),await goosemod.moduleStoreAPI.updateStoreSetting(),document.querySelector(".selected-aXhQR6").click()},a=async()=>{s(),await n(),S()},{Button:r}=goosemod.webpackModules.findByProps("Button"),i=goosemod.webpackModules.findByProps("button","colorRed"),d=goosemod.webpackModules.findByProps("ModalRoot"),l=goosemod.webpackModules.findByProps("socialLink","date"),c=goosemod.webpackModules.findByDisplayName("LegacyHeader"),m=goosemod.webpackModules.findByDisplayName("Text"),{openModal:p}=goosemod.webpackModules.findByProps("openModal","updateModal"),g=goosemod.webpackModules.findByDisplayName("Flex"),u=goosemod.webpackModules.findByDisplayName("TextInput"),h=goosemod.webpackModules.findByDisplayName("Tooltip"),f=goosemod.webpackModules.findByDisplayName("FlowerStar"),y=goosemod.webpackModules.findByDisplayName("Verified"),b=goosemod.webpackModules.findAll((e=>"Alert"===e.displayName)).pop(),S=()=>{const t=[];let S=0;for(const s of goosemod.moduleStoreAPI.repos){const r=[s.meta.name];if(s.pgp?.trustState){let t="",o=null;switch(s.pgp.trustState){case"trusted":t="已通過 PGP 驗證",o=e.createElement(y,{className:"icon-1ihkOt"});break;case"untrusted":t="未通過 PGP 驗證",o=e.createElement(b,{className:"icon-1ihkOt"});break;case"unknown":t="無 PGP 驗證",o=e.createElement(b,{className:"icon-1ihkOt"})}r.unshift(e.createElement("span",{style:{display:"inline-flex",position:"relative",top:"2px",marginRight:"4px"}},e.createElement(h,{position:"top",color:"primary",text:t},(({onMouseLeave:s,onMouseEnter:n})=>e.createElement(f,{className:`gm-repos-modal-icon-${o.type.displayName}`,"aria-label":t,onMouseEnter:n,onMouseLeave:s},o)))))}t.push(e.createElement(o,{style:{marginTop:0===S?"16px":""},note:s.meta.description,value:s.enabled,onChange:e=>{s.enabled=e,n()},buttonOpenLink:()=>{window.open(s.url)},buttonOnClick:async()=>{goosemod.moduleStoreAPI.repos.splice(goosemod.moduleStoreAPI.repos.indexOf(s),1),a()}},...r)),S++}let w="";p((o=>(s=o.onClose,e.createElement(d.ModalRoot,{transitionState:o.transitionState,size:"medium"},e.createElement(d.ModalHeader,{},e.createElement(g.Child,{basis:"auto",grow:1,shrink:1,wrap:!1},e.createElement(c,{tag:"h2",size:c.Sizes.SIZE_20},"源"),e.createElement(m,{size:m.Sizes.SIZE_12,className:l.date},goosemod.moduleStoreAPI.modules.filter((e=>e.tags.includes("theme"))).length," Themes",", ",goosemod.moduleStoreAPI.modules.filter((e=>!e.tags.includes("theme"))).length," Plugins",", ",Object.keys(goosemod.moduleStoreAPI.modules.reduce(((e,t)=>{let o=t.authors;return o.forEach||(o=[o]),o.forEach((t=>e[t.n||t.match(/(.*) \(([0-9]{17,18})\)/)?.[1]||t]=!0)),e}),{})).length," Developers")),e.createElement("FlexChild",{basis:"auto",grow:0,shrink:1,wrap:!1},e.createElement(d.ModalCloseButton,{onClick:o.onClose}))),e.createElement(d.ModalContent,{},...t,e.createElement(g,{style:{marginBottom:"16px"},basis:"auto",grow:1,shrink:1},e.createElement(u,{className:"codeRedemptionInput-3JOJea",placeholder:"https://example.com/modules.json",onChange:e=>{w=e}}),e.createElement(r,{style:{width:"112px"},size:i.sizeMedium,onClick:async()=>{let e={};try{e=await(await fetch(w)).json()}catch(e){}if(void 0===e.meta?.name)return void goosemod.showToast("源無效",{type:"error",timeout:5e3,subtext:"格式錯誤"});if(!confirm("GooseMod 的開發者將因爲沒有對此第三方源的控制權而無法保證模組的安全與質量。\n\n因可能會對您 Discord 客戶端造成不必要的安全風險,如果您不信任此源的擁有者,請不要添加此源。\n\n如您已知悉添加第三方源帶來的風險並執意要添加,請在下面點 OK。"))return void goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"確認取消"});const t={url:w,meta:e.meta,enabled:!0},o=await goosemod.moduleStoreAPI.verifyPgp(t,!1);"untrusted"!==o.trustState?"trusted"===o.trustState||confirm("因爲此第三方源沒有 PGP 驗證,請在加入此源之前確認源開發者的可信度。\n\n如想徹底解決這個問題,請要求源開發者增加 PGP 支援。\n\n如您已知悉潛在的風險並執意要添加,請在下面點 OK。")?(goosemod.moduleStoreAPI.repos.push(t),a()):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"確認取消"}):goosemod.showToast("已取消添加新的源",{type:"danger",timeout:5e3,subtext:"PGP 認證錯誤"})}},"下載")))))))};S()},header$2=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("updateAvailable"),o=goosemod.webpackModules.findByProps("icon","iconBadge","title"),s=e.createElement(goosemod.webpackModules.findByDisplayName("Retry"),{width:24,height:24,className:o.icon}),n=e.createElement(goosemod.webpackModules.findByDisplayName("Cloud"),{width:24,height:24,className:o.icon}),a=goosemod.webpackModules.findByDisplayName("HeaderBarContainer"),r=goosemod.webpackModules.findByDisplayName("TabBar"),i=goosemod.webpackModules.findByProps("topPill"),d=goosemod.webpackModules.findByProps("tabBar","nowPlayingColumn"),l={themes:"STORE",plugins:"STORE"};return class extends e.PureComponent{constructor(e){super(e)}render(){return e.createElement(a,{isAuthenticated:!0,transparent:!1},e.createElement(a.Icon,{icon:()=>this.props.icon,className:o.icon}),e.createElement(a.Title,{},this.props.title),l[this.props.id]?e.createElement(a.Divider):null,l[this.props.id]?e.createElement(r,{selectedItem:l[this.props.id],type:i.topPill,className:d.tabBar,onItemSelect:e=>{l[this.props.id]=e,this.forceUpdate(),setTimeout(goosemod.settings.updateModuleStoreUI,10)}},e.createElement(r.Item,{id:"STORE",look:0,className:d.item},"商店"),e.createElement(r.Item,{id:"IMPORTED",look:0,className:d.item},"已安裝")):null,"snippets"!==this.props.id?e.createElement("div",{className:o.toolbar,style:{position:"absolute",right:"0px"}},e.createElement(a.Icon,{icon:()=>s,tooltip:"刷新",onClick:async()=>{document.querySelector(`.${o.toolbar} > [role="button"] > svg`).classList.add(t.updateAvailable),await goosemod.moduleStoreAPI.hotupdate(!0),document.querySelector(".selected-aXhQR6").click()}}),e.createElement(a.Icon,{icon:()=>n,tooltip:"源",onClick:openReposModal})):"")}}},header$3={__proto__:null,default:header$2},_Divider=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormDivider"),o=goosemod.webpackModules.findByProps("dividerDefault","titleDefault");return class extends e.PureComponent{render(){return e.createElement(t,{className:o.dividerDefault})}}},divider={__proto__:null,default:_Divider},header=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormTitle"),o=goosemod.webpackModules.findByProps("marginTop20","marginBottom8"),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science");return class extends e.PureComponent{constructor(t){t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:18,height:18,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{style:{verticalAlign:"unset"},className:"gm-settings-label-text"},t.text)]),t.id=`gm-settings-header-${Math.random().toString().substring(2)}`,t.collapsible=void 0!==t.collapsed,t.collapsed=t.collapsed||!1,t.hide&&(t.collapseOffset=0),super(t),this.props.handleCollapse=()=>{const e=[...document.querySelectorAll(`#${this.props.id} ~ *`)],t=e.slice(0,e.indexOf(e.find((e=>"H5"===e.tagName))));for(const e of t.slice(this.props.collapseOffset||0))e.style.display=this.props.collapsed?"none":""},this.props.collapsed&&this.props.handleCollapse()}render(){return setTimeout(this.props.handleCollapse,100),this.props.hide?null:e.createElement(t,{tag:"h5",className:(0!==this.props.i?o.marginTop20+" ":"")+o.marginBottom8,onClick:this.props.collapsible?()=>{this.props.collapsed=!this.props.collapsed,this.props.handleCollapse(),this.forceUpdate()}:void 0,id:this.props.id},this.props.text,this.props.collapsible?e.createElement(goosemod.webpackModules.findByDisplayName("DropdownArrow"),{className:["gm-settings-header-collapser",this.props.collapsed?"collapsed":""].join(" "),width:22,height:22}):null)}}},header$1={__proto__:null,default:header},toggle=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("SwitchItem"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("Tooltip"),n=goosemod.webpackModules.findByDisplayName("Science"),a=goosemod.webpackModules.findByDisplayName("InfoFilled");return class extends e.Component{constructor(t){const o=t.onToggle;t.onChange=e=>{this.props.value=e,this.forceUpdate(),o(e)},t.experimental&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Experimental"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(n,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Experimental:** "+t.subtext),t.debug&&(t.text=[e.createElement(s,{position:"top",color:"primary",text:"Debug"},(({onMouseLeave:t,onMouseEnter:o})=>e.createElement(a,{width:22,height:22,className:"gm-settings-label-icon",onMouseLeave:t,onMouseEnter:o}))),e.createElement("span",{className:"gm-settings-label-text"},t.text)],t.subtext="**Debug:** "+t.subtext),super(t)}render(){return e.createElement(t,{value:this.props.isToggled(),note:e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""),disabled:!!this.props.disabled&&this.props.disabled(),onChange:this.props.onChange},this.props.text)}}},toggle$1={__proto__:null,default:toggle},text=()=>{const e=_Divider(),{React:t}=goosemod.webpackModules.common,o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("Flex"),a=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),r=goosemod.webpackModules.findByProps("title","dividerDefault"),i=goosemod.webpackModules.findByProps("formText","placeholder");return class extends t.PureComponent{render(){return t.createElement(o,{className:[n.Direction.VERTICAL,n.Justify.START,n.Align.STRETCH,n.Wrap.NO_WRAP,a.marginBottom20].join(" ")},t.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},t.createElement("div",{},t.createElement("div",{className:r.labelRow,style:{marginBottom:"4px"}},t.createElement("label",{class:r.title},this.props.text)),t.createElement(s,{className:i.description},this.props.subtext))),t.createElement(e))}}},text$1={__proto__:null,default:text},textAndChild=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider();goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");const o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByDisplayName("FormItem"),n=goosemod.webpackModules.findByDisplayName("FormText"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("title","dividerDefault"),d=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(s,{className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:i.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:i.title},this.props.text)),e.createElement(n,{className:d.description},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.subtext||""))),this.props.children),e.createElement(t))}}},textAndChild$1={__proto__:null,default:textAndChild},textAndButton=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes"),s=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormText"),r=goosemod.webpackModules.findByDisplayName("Flex"),i=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),d=goosemod.webpackModules.findByProps("title","dividerDefault"),l=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return e.createElement(n,{className:[r.Direction.VERTICAL,r.Justify.START,r.Align.STRETCH,r.Wrap.NO_WRAP,i.marginBottom20].join(" ")},e.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},e.createElement("div",{},e.createElement("div",{className:d.labelRow,style:{marginBottom:"4px"}},e.createElement("label",{class:d.title},this.props.text)),e.createElement(a,{className:l.description},e.createElement(s,{className:"gm-settings-note-markdown"},this.props.subtext||""))),e.createElement(o,{color:this.props.danger?o.Colors.RED:o.Colors.BRAND,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.buttonText)),e.createElement(t))}}},textAndButton$1={__proto__:null,default:textAndButton},textAndColor=()=>{const{React:e,constants:{DEFAULT_ROLE_COLOR:t,ROLE_COLORS:o}}=goosemod.webpackModules.common,s=_Divider(),n=goosemod.webpackModules.findByDisplayName("FormItem"),a=goosemod.webpackModules.findByDisplayName("FormTitle"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("defaultMarginh5");return class extends e.PureComponent{constructor(e){e.default=(e=>{if(e&&7===e.length)return parseInt(e.slice(1),16)})((e.initialValue||(()=>{}))())||0,e.value=e.default,super(e)}render(){const d=goosemod.webpackModules.find((e=>"ColorPicker"===e.default?.displayName));return e.createElement(n,{className:[r.marginBottom20].join(" ")},e.createElement(a,{tag:"h5",className:(0!==this.props.i?r.marginTop20+" ":"")+i.defaultMarginh5},this.props.text),e.createElement(d.default,{colors:o,defaultColor:this.props.default||t,disabled:!1,value:this.props.value,customColor:null,renderDefaultButton:t=>e.createElement(d.DefaultColorButton,t),renderCustomButton:t=>e.createElement(d.CustomColorButton,t),customPickerPosition:"bottom",onChange:e=>{var t;this.props.value=e,this.forceUpdate(),this.props.oninput("#"+((16711680&(t=e))>>>16).toString(16).padStart(2,"0")+((65280&t)>>>8).toString(16).padStart(2,"0")+(255&t).toString(16).padStart(2,"0"))}}),e.createElement(s))}}},textAndColor$1={__proto__:null,default:textAndColor},button=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByProps("Sizes","Colors","Looks","DropdownSizes");return class extends e.PureComponent{render(){return e.createElement(t,{color:t.Colors.BRAND,size:t.Sizes.SMALL,disabled:this.props.disabled,onClick:()=>this.props.onclick()},this.props.text)}}},button$1={__proto__:null,default:button},search=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.find((e=>"SearchBar"===e.displayName&&e.prototype.focus));return class extends e.PureComponent{render(){return this.props.text||(this.props.text=""),setTimeout((()=>{this.props.onchange(this.props.text)}),10),e.createElement(t,{...t.defaultProps,className:this.props.storeSpecific?"gm-store-search":"",size:t.Sizes.MEDIUM,query:this.props.text,placeholder:this.props.placeholder||"Search",onClear:()=>{this.props.text="",this.forceUpdate()},onChange:e=>{this.props.text=e,this.forceUpdate()}})}}},search$1={__proto__:null,default:search},dropdownIndividual=()=>{const{React:e}=goosemod.webpackModules.common,{SingleSelect:t}=goosemod.webpackModules.findByProps("SingleSelect"),o=goosemod.webpackModules.findByDisplayName("FormText"),s=goosemod.webpackModules.findByProps("formText","placeholder");return class extends e.PureComponent{render(){return"function"==typeof this.props.options&&(this.props.options=this.props.options()),this.props.value||(this.props.value=(this.props.selected||(()=>{}))()||this.props.options[0]),setTimeout((()=>{this.props.onchange(this.props.value)}),10),e.createElement("div",{className:"gm-inline-dropdown"},e.createElement(o,{className:s.description},this.props.label),e.createElement(t,{searchable:!1,onChange:e=>{this.props.value=e.value,this.forceUpdate()},value:this.props.value,options:this.props.options.map((e=>({label:e,value:e})))}))}}},dropdownIndividual$1={__proto__:null,default:dropdownIndividual},_StoreHeader=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("Text");return class extends e.PureComponent{render(){return e.createElement("div",{className:"gm-store-header"},e.createElement(t,{color:t.Colors.HEADER_PRIMARY,size:t.Sizes.SIZE_20},this.props.text))}}},storeHeader={__proto__:null,default:_StoreHeader},storeCategory=()=>{const{React:e}=goosemod.webpackModules.common,t=_StoreHeader(),o=_Card(),s=goosemod.webpackModules.findByProps("scrollerBase","auto","thin");return class extends e.PureComponent{render(){return this.props.cards||(this.props.cards=goosemod.settings.items.find((e=>e[1]===this.props.itemName))[2].filter((e=>"card"===e.type)).sort(this.props.sort).slice(0,10).map((t=>e.createElement(o,t)))),e.createElement("div",{className:"gm-store-category"},e.createElement(t,{text:this.props.text}),e.createElement("div",{className:s.auto},...this.props.cards))}}},storeCategory$1={__proto__:null,default:storeCategory},custom=()=>{const{React:e}=goosemod.webpackModules.common;return class extends e.PureComponent{render(){return e.createElement("div",{ref:e=>{e&&e.appendChild("function"==typeof this.props.element?this.props.element():this.props.element)}})}}},custom$1={__proto__:null,default:custom},textInput=()=>{const{React:e}=goosemod.webpackModules.common,t=_Divider(),o=goosemod.webpackModules.findByDisplayName("FormItem"),s=goosemod.webpackModules.findByDisplayName("FormText"),n=goosemod.webpackModules.findByDisplayName("TextInput"),a=goosemod.webpackModules.findByDisplayName("Flex"),r=goosemod.webpackModules.findByProps("marginTop20","marginBottom20"),i=goosemod.webpackModules.findByProps("formText","description");return class extends e.PureComponent{render(){return e.createElement(o,{title:this.props.text,className:[a.Direction.VERTICAL,a.Justify.START,a.Align.STRETCH,a.Wrap.NO_WRAP,r.marginBottom20].join(" ")},e.createElement(n,{onChange:e=>{this.props.oninput(e)},defaultValue:this.props.initialValue?this.props.initialValue():""}),this.props.subtext&&e.createElement(s,{className:[i.description,r.marginTop8].join(" ")},this.props.subtext),e.createElement(t))}}},textInput$1={__proto__:null,default:textInput},subtext=()=>{const{React:e}=goosemod.webpackModules.common,t=goosemod.webpackModules.findByDisplayName("FormText"),o=goosemod.webpackModules.find((e=>"Markdown"===e.displayName&&e.rules)),s=goosemod.webpackModules.findByProps("marginTop20","marginBottom20");return class extends e.PureComponent{render(){return e.createElement(t,{type:"description",className:s.marginBottom20},e.createElement(o,{className:"gm-settings-note-markdown"},this.props.text||""))}}},subtext$1={__proto__:null,default:subtext}})();//# sourceURL=GooseMod \ No newline at end of file diff --git a/index.js b/index.js index bb572e8d..b14f163e 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -(function(){"use strict";var sleep=e=>new Promise((o=>setTimeout(o,e)));const init=async()=>{for(;!window.webpackJsonp?.push&&!window.webpackChunkdiscord_app?.push;)await sleep(10);let wpRequire;window.webpackJsonp?(wpRequire=window.webpackJsonp.push([[],{get_require:(e,o,t)=>e.exports=t},[["get_require"]]]),delete wpRequire.m.get_require,delete wpRequire.c.get_require):window.webpackChunkdiscord_app&&window.webpackChunkdiscord_app.push([["gm_webpackInject"],{},e=>{wpRequire=e}]);const locale=Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).find((e=>e?.default?.getLocaleInfo)).default.getLocale();console.log("[GooseMod Bootstrap]","Found locale",locale);try{eval(await(await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-prod/goosemod.${locale}.js?_1663602873739`)).text())}catch(e){console.warn("[GooseMod Bootstrap]","Failed to fetch with buildtime",e),eval(await(await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-prod/goosemod.${locale}.js?_${Date.now()}`)).text())}};init()})(); +(function(){"use strict";var sleep=e=>new Promise((o=>setTimeout(o,e)));const init=async()=>{for(;!window.webpackJsonp?.push&&!window.webpackChunkdiscord_app?.push;)await sleep(10);let wpRequire;window.webpackJsonp?(wpRequire=window.webpackJsonp.push([[],{get_require:(e,o,t)=>e.exports=t},[["get_require"]]]),delete wpRequire.m.get_require,delete wpRequire.c.get_require):window.webpackChunkdiscord_app&&window.webpackChunkdiscord_app.push([["gm_webpackInject"],{},e=>{wpRequire=e}]),eval(await(await fetch("https://raw.githubusercontent.com/GooseMod/defiant/main/index.js?_"+Date.now())).text());const locale=Object.keys(wpRequire.c).map((e=>wpRequire.c[e].exports)).find((e=>e?.default?.getLocaleInfo)).default.getLocale();console.log("[GooseMod Bootstrap]","Found locale",locale);try{eval(await(await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-prod/goosemod.${locale}.js?_1664238118560`)).text())}catch(e){console.warn("[GooseMod Bootstrap]","Failed to fetch with buildtime",e),eval(await(await fetch(`https://raw.githubusercontent.com/GooseMod/GooseMod/dist-prod/goosemod.${locale}.js?_${Date.now()}`)).text())}};init()})();